Custom Field Date Pagination Error
My site is running WordPress 4.9.1 using Admin Columns Pro 4.1.1.
I’m having an issue when I sort my “Items” post type by my custom date field called “Item Date”. The columns are sorting properly by the date, the issue is with the pagination. I can successfully click on the forward and backward arrows to navigate between each page list of items one by one, but if I go try to manually go from page 1 to say page 3 or page 12 (by typing the number in the pagination navigation bar) the columns returns a blank list of items. This is only happening when I have the columns sorted by my custom date field. If I reset sorting and sort by anything else, the pagination works fine.
We only have 1 function on the backend that’s doing any customization to the admin columns and when I remove that function I’m still getting the error. I also turned off everything that I possibly could on my theme’s function file and disabled plugins to try and fix the issue, but it was still happening. So I don’t believe that there’s anything in my theme or plugins that are causing the issue.
I may or may not have a solution, but I’m not sure why this works or what is causing this. After I type in a number in the pagination navigation bar and hit enter, I notice that the URL returns several parameters as listed below:
?orderby=column-meta&order=asc&s&post_status=all&post_type=item_archive&action=-1&m=0&_ac_nonce=****&layout&paged=12&action2=-1
Most of these parameters make sense to be here, but I wasn’t sure what some of theme were doing in this instance. So, I started removing parameters from the URL one by one and found that if I remove &s
from the parameter string and then run the URL… the list of items returns successfully. So basically run the URL like so:
?orderby=column-meta&order=asc&post_status=all&post_type=item_archive&action=-1&m=0&_ac_nonce=****&layout&paged=12&action2=-1
It’s very strange and I’m not sure why that allows the query to run successfully since the s
parameter is typically used as WordPress’ default search parameter and really shouldn’t affect the column queries. Is it possible that there’s a bug in the plugin that’s conflicting with the pagination? Or is there any other reason you can think that my custom date field would be messing up the pagination?
You must be logged in to reply to this topic.