ronalfy / reorder-posts

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

Failing to reorder #21

Closed ryanhellyer closed 9 years ago

ryanhellyer commented 9 years ago

Something has goofed up and I can no longer reliably reorder posts.

I suspect this may have something to do with the limiting of the number of posts. I have a lot of pages I am reordering, but they're mostly child pages.

I thought it might have been a caching issue, so I shut of my object cache, but that didn't help.

ryanhellyer commented 9 years ago

Total number of published pages is 82, so it's not a crazy high number of posts I'm attempting to reorder.

The drag and drop system looks like it's working, I briefly get the spinning icon as expected, but it only sporadically reorders things.

ronalfy commented 9 years ago

It might be taking longer than expected and possibly navigating away from the page before the reordering is finished.

I mirrored the reordering after 10up's plugin. It grabs the first 50 posts, reorders those, then grabs the next 50, and so on. So 82 posts would require two server calls, so it may be about 2-10 seconds before reordering is finished.

If this is the case, I'll try to find a way to make the loading icon a little more prevalent so that you'll always see it, no matter how far down you are on the page.

ryanhellyer commented 9 years ago

I'll test to see if waiting helps.

ryanhellyer commented 9 years ago

Time doesn't seem to be the problem. I left it for about two minutes and it still didn't save. What I did notice though, was that if I manually set the page parent via the regular post edit screen they get added as children. But I can't do that via the plugins reorder page anymore.

I suspect this is somehow related to the 50 post limit, but I'm not sure in what way.

ronalfy commented 9 years ago

Ok, I'll do some testing on this. Thanks for the report.

ronalfy commented 9 years ago

I can't duplicate this, even on my personal site with 400+ posts.

I even tried on the pages and re-nested hierarchical items (30+ posts).

Do you happen to have some kind of pre_get_posts that is affecting the admin panel queries?

ryanhellyer commented 9 years ago

I prepared a test site for you to look at. But it worked fine. I then went to check my live site again, and it worked. I'm not sure what would have caused it to fail miserably for a day, then start working again, but it did.

I'm going to mark this as closed since I can't replicate it now, but something was definitely behaving very oddly there for a while.

Sorry for a dud report :/