ronalfy / reorder-posts

Reorder Posts
GNU General Public License v2.0
6 stars 0 forks source link

Menu order isn't changing #22

Closed ryanhellyer closed 9 years ago

ryanhellyer commented 9 years ago

I'm modifying the order of a page, and it's working. But for some reason the page order is not changing??? Isn't that how it works? It modifies the page order?

ronalfy commented 9 years ago

Yeah, it changes the menu_order argument in the posts table.

ryanhellyer commented 9 years ago

... queue Twilight zone music ...

The Emoji plugin shows a menu order of zero, yet is not the first in the list (the list is definitely controlled by the plugin). https://geek.hellyer.kiwi/plugins/

reorder

ronalfy commented 9 years ago

Hmm, can you do me a favor and place a constant in your config

define( 'REORDER_DEBUG', true );

Then on the Reorder it'll spit out what menu order everything is.

ronalfy commented 9 years ago

There might me multiple zeros is my concern.

ryanhellyer commented 9 years ago

Me no understandy ...

reorder

ronalfy commented 9 years ago

Hmm, that is weird. Does re-ordering help fix the order at all?

ryanhellyer commented 9 years ago

No. What you see above is after I reordered.

I just don't get how it's reordering it at all, if the menu order is not changing :/

ryanhellyer commented 9 years ago

The plugin does appear to be working. Just in a magical mystery way which I do not understand :/

ryanhellyer commented 9 years ago

I have a theory that this might be a caching issue. The plugin uses direct queries, but the menu orders may be stored in the object cache. So perhaps the cache is displaying those numbers, but you are pulling the order directly from the DB.

I'll test this later once I regain SSH access to my server (stupid connection keeps failing from my current location).

ryanhellyer commented 9 years ago

I got in faster than I thought. I disabled my object cache and the problem disappeared. So I'm guessing there is some cache which is meant to be flushed during the reordering process.

ronalfy commented 9 years ago

Yeah, if I did wp_update_post, which does some cache clearing, the reordering process takes about 50 times longer. If you find a solution, please let me know. On Tue, Mar 24, 2015 at 04:08 Ryan Hellyer notifications@github.com wrote:

I got in faster than I thought. I disabled my object cache and the problem disappeared. So I'm guessing there is some cache which is meant to be flushed during the reordering process.

— Reply to this email directly or view it on GitHub https://github.com/ronalfy/reorder-posts/issues/22#issuecomment-85411495 .

ronalfy commented 9 years ago

@ryanhellyer I added some cache-busting to version 2.1.4. It should be working because it's the same thing done in wp_insert_post, but if you can try it out, you will help out with my sanity and I can close this :D

ryanhellyer commented 9 years ago

Working :)

ryanhellyer commented 9 years ago

Working :)