• Resolved Nick Sinclair

    (@nicksinclair)


    I use a plugin to help rearrange posts and custom post types on the Edit Posts / Pages screen (/edit.php?post_type=page). These usually just adjust the menu_order property.

    By default, in the latest version of this plugin, it seems to drastically rearrange any previously arranged items as soon as you “Duplicate” an object (post, page, cpt) from this screen.

    Edit: I’m using the “Basic” plugin settings.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Joe

    (@joemc)

    @nicksinclair thanks for reaching out. There is nothing in the plugin that modifies any data of existing posts, so I’m not sure what is going on. Are you able to see the menu_order property of posts before and then after duplication? If the page is auto-refreshing after duplicating posts it’s possible that when the page refreshes it’s just ordering the posts by name or id instead of menu_order which would make them seem out of order. But, the refresh should be refreshing with the same query vars and keep the same order.

    Can you let me know what plugin you are using the help rearrange posts?

    Thread Starter Nick Sinclair

    (@nicksinclair)

    Hi @joemc,

    The plugin I’m using is Simple Custom Post Order

    I tested it again and it seems as though the problem might be that:

    • I rearrange my posts using SCPO
      • Front page is now menu_order = 1
    • Hit refresh
    • Rearrange some more (without refreshing)
    • Duplicate a page with your plugin (which refreshes the page)
    • Now the pages are listed by post_title ASC rather than menu_order
      • Front page is now menu_order = 35

    It’s possible it’s a conflict with SCPO because I think the way that plugin is working is that it saves the post order on page load / unload / refresh rather than using an AJAX request.

    Let me know if a video might help.

    Thanks!

    Plugin Support Joe

    (@joemc)

    @nicksinclair thanks for the further explanation and description. I have installed SPCO locally, ran some tests and believe I have found the reason this is happening. I’ll be releasing an update in the next few days that should resolve the issue, specific to SPCO.

    Plugin Support Joe

    (@joemc)

    @nicksinclair I believe I have this issue resolved with the latest update I released today. Please check it out when you get a chance and let me know if you still have any issues.

    Thread Starter Nick Sinclair

    (@nicksinclair)

    Mate, thank you, that’s awesome and you’re awesome.

    The only thing that could make that better would be if it were possible to use the menu_order of the item you’ve duplicated and then add 1 to that, so that when the page refreshes the copy appears after the object you originally duplicated, but I’m not sure how that would affect the rest of the ordering.

    This is certainly working great for the time being though; I might just configure the plugin so that when the new post is created, it automatically goes into “Edit” instead of refreshing the page so the users don’t have to search for the copy at the bottom of the screen.

    Thanks again for your hard work. It’s a great plugin.

    N.

    Plugin Support Joe

    (@joemc)

    Thanks for confirming that it’s working!

    I understand your desire for the menu_order increment, but after looking into how SCPO works, any conflicting menu_order index causes the initial issue you were seeing. So, the best way to ensure existing menu_order indexes aren’t modified was to set the cloned post index to the highest index + 1.

    Thread Starter Nick Sinclair

    (@nicksinclair)

    Yeah, understood – thanks again!

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.