Skip Navigation

[Closed] Archive Page View Ordering/Sorting Not Displaying in Editor

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by Christian Cox 3 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#2128621
Screen Shot 2021-07-29 at 3.43.25 AM.png

Tell us what you are trying to do?
Sort by an archive view by menu order

Is there any documentation that you are following?
Not really but it works on other archive templates ?

Is there a similar example that we can see?
Attached is a screenshot, it will let me use secondary sorting on this archive template, but for primary I think it is 'stuck' to random so it's sort of screwing up a lot of pages and SEO

What is the link to your site?

#2129119

Hi, that's unusual. Usually the primary sort criteria is displayed right there, above the direction. Sometimes there is a brief delay while the editor is loading data, but after a few moments at most, it should appear, unless there is another problem blocking the data loading process. There could be a conflict with another plugin, or with a theme, or some other custom code, causing that delay to be longer than usual or just open-ended. Can you try these troubleshooting steps and let me know the results?
- Be sure your Toolset plugins are all up-to-date: Go to wp-admin > Plugins > Add New > Commercial tab and click "Check for Updates" in the Toolset installer panel. The latest Blocks plugin is 1.6, Types is 3.4.11.
- Temporarily deactivate any custom code snippets in Toolset > Settings > Custom Code.
- Temporarily deactivate all plugins except Types (if active) and Blocks (or Views if you use the legacy Views plugin). If you want to activate a maintenance mode plugin during testing, that should be fine.
- Temporarily activate a default theme like Twenty Twenty One.
- Reload the WP Archive editor page and try to adjust the primary ordering options again.
- If the problem is still not resolved, I'll need to take a closer look. Something unusual is going on there.
- if the problem is resolved, it sounds like there is a conflict between Toolset and one of the other components of your site. You can reactivate your custom code snippets, theme, and other plugins, one-by-one, testing each time you reactivate a component, to determine the source of the conflict.

Let me know what you find out, or if you need more information to troubleshoot further.

#2129289

I noticed the updates for toolset plugins, so I did that after submitting this ticket, still same issue.

I know that sometimes things have to load, but all the filter options (for the view) take a long time, then when they finish I start editing typically.

This is for the 'State Listing' archive, the 'City Listing' archive has the sorting option display, and they are basically the same archive template just slightly different.

I deactivated all potential conflicting plugins, logged out and logged in, cleared all cache including cloudflare, made sure everything *incliding WP* is updated.. now I can't even get the editor to load to be interactive, just shows the placeholder, then hangs, returns: Updating failed. The response is not a valid JSON response.

Sometimes it does this, in which case I leave the tab open and give it time to try and try again, eventually it will let me edit, but even then, the Ordering select option (as you mentioned is usually there, and is there on other archive templates) never shows.

Is there any way to force toolset to sort with menu order regardless of that select option? The entire site uses this and always will, wouldn't mind hardcoding.

#2131533

now I can't even get the editor to load to be interactive, just shows the placeholder, then hangs, returns: Updating failed. The response is not a valid JSON response.
Okay that is unusual, I think there is one open issue related to similar symptoms: https://toolset.com/errata/unexplained-problems-on-backend-edit-screens-possibly-associated-with-json-errors/

I think the next step to try is to see if there are any relevant server-side errors that might shed some light on the problem here. If you are not familiar with server-side error logging, I can show you how to create and activate one by adjusting your wp-config.php file.

Go in your wp-config.php file and look for

define('WP_DEBUG', false);

Change it to:

define('WP_DEBUG', true);

Then add these lines, just after the WP_DEBUG line:

define('WP_DEBUG_LOG', dirname(__FILE__) . '/error_log.txt');
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

Reload the archive editor page in wp-admin to test it once again. If any server-side errors are triggered during this process, it will create an error_log.txt file in your site's root directory. Use FTP to look for this file in the same directory as wp-config.php. You may need to click "Refresh" in your FTP browser to see a new file appear. Please download this file to your computer, open it in any text editing software, and send me its contents. Once that is done, you can revert the changes you made to wp-config.php and delete the log file using FTP.

Is there any way to force toolset to sort with menu order regardless of that select option? The entire site uses this and always will, wouldn't mind hardcoding.
You could use the Views Filter API wpv_filter_query to programmatically set the primary sort order for all Views, but this API unfortunately does not apply to archives so that solution would not be helpful in all cases. When archives are involved, the primary sort order must be managed in the Block Editor.

Please let me know what you find out, if anything, from the server logs and we can continue troubleshooting from there. Thank you!

#2131821

I got it working, and here's how:

I disabled every plugin (including toolset), reverted to 2020 theme, opened the archive template from URL as a page, and forced text editor (not block editor), because block editor was still breaking, then enabled toolset, refreshed that page template in block editor (which made the page super broken of course in editor and published), and it populated the options, then I saved it, re-enabled the other plugins and the theme, and it 'saved' the sorting

I can still edit the template with everything enabled, but each time I publish, I have to re-do the above steps because the sorting reverts back to 'random' (which isnt good lol)

I will dig more in to the error logs and maybe will find a solution or cause there, I think it's the UAG plugin (I use this to get an accordion plugin that works with toolset), but disabling that alone does not fix the issue

I'll paste you the logs in a day or two because I do have more changes to make to that template

#2133041

Ugh, that's a pain but I'm glad you were able to find some way forward. I'll stand by for your updates in a day or two.

The topic ‘[Closed] Archive Page View Ordering/Sorting Not Displaying in Editor’ is closed to new replies.