• Resolved Jacob Gotwals

    (@jacob-gotwals)


    Thank you for your work on this plugin, I have found it to be helpful.

    I believe editing multiple post types in multiple windows can delete/overwrite the incorrect post types. Here’s how this can happen:

    In Custom Post Type UI 0.8, when I click:
    Custom Post Types / Manage Post Types / Edit
    this opens an edit screen for the selected post type. In the URL for this screen, I believe the post type to be edited gets selected via an index URL parameter, for instance:
    &edittype=2
    Then when I click “Save Custom Post Type” on the edit screen, this returns me to the “Manage Post Types” screen, and the post types have been rearranged (the post type that was just edited is moved to the bottom of the list). This means the post types all have new indexes.

    A common use case for me is simultaneously editing multiple data items in multiple windows (for example, using firefox’s right-click “Open Link In New Tab” feature on the “Edit” links for multiple post types). Because of the way Custom Post Type UI currently works, I believe this can cause data loss: when I click “Save Custom Post Type” in one window, the post type indices are rearranged in the database; then when I click “Save Custom Post Type” in the next window (which now has an incorrect index parameter in the URL), an incorrect post type gets edited. I imagine the same behavior may occur when editing multiple taxonomies simultaneously, though I have not tried this.

    I believe this behavior just caused a few of my post types to get overwritten with incorrect data when I edited multiple post types simultaneously in multiple windows. I was able to restore my post type data by deleting the incorrect post types and re-creating them. I found this a disturbing and confusing experience.

    If I have understood this issue correctly, this seems like a fairly serious problem. I’m not sure what the solution would be. An easy first step would be adding a prominent warning to the Manage Post Types screen (and perhaps Manage Taxonomies too) warning against editing multiple post types / taxonomies simultaneously in multiple windows.

    http://wordpress.org/plugins/custom-post-type-ui/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hi Jacob,

    Thank you very much for raising these concerns. I find it very easy to understand why this would be a concern that should be addressed.

    That said, off the top of my mind right now, I’m not sure how to go about this. It’s also been awhile since I really looked at that part of the code. The main thing I’d need to be concerned about is making sure any changes to this is backwards compatible. My thoughts are this for a possible solution. Instead of an indexed array, switch over to an associative array that would use the CPT slug for the index instead of numerals.

    The backwards compatibility part will be a big hurdle especially with a guestimate install base of 283,780. I don’t think it’s an impossible one though.

    I’m going to start an issue for it over at https://github.com/WebDevStudios/custom-post-type-ui which is where we do all of our actual development. Feel free to check in there soon and also offer ideas/feedback for it.

    Thread Starter Jacob Gotwals

    (@jacob-gotwals)

    Okay, thanks for looking into this, and thanks for the prompt reply!

    @michael I’ve also just had a problem while editing multiple post types opened in multiple browser tabs.

    One of my post types has been deleted, another has been duplicated.

    What is the issue # on github?

    Thank you

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    https://github.com/WebDevStudios/custom-post-type-ui/issues/87

    Not much there at the moment, but definitely feel free to throw in your thoughts/concerns and all of the devs for the plugin can discuss possible solutions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problems when simultaneously editing multiple post types in multiple windows’ is closed to new replies.