Skip Navigation

[Resolved] 404 error on all single record displays

This support ticket is created 6 years, 8 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 2 replies, has 2 voices.

Last updated by jimP 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#557818

I am trying to: Access single records from archive view

Link to a page where the issue can be seen: [login-restricted:] hidden link

I expected to see: Single record, which we've routinely (successfully) seen on this site

Instead, I got: 404 error, consistently across all records for all Toolset CPTs on this site. But not for non-Toolset CPTs, and not for other sites (as far as I've seen) on the multisite.

I've re-saved permalinks, which usually fixes 404 errors but has not this time. Emptied cache front/back, resaved permalinks, no dice.

I've checked rewrite rules via Debug This plugin. For the example above (CPT = student), applicable rewrite rules currently implemented include:

student/?$ [rewrite as] index.php?post_type=student
student/([^/]+)(?:/([0-9]+))?/?$ [rewrite as] index.php?student=$matches[1]&page=$matches[2]

I can access a single record via e.g.

hidden link

But I cannot access the single record as per the Toolset link from archive view, e.g.

hidden link

I am using latest versions of all Toolset and other plugins, and latest WP core.

My suspicion is that there is an offending plugin on this particular site, but I cannot find it, and since this site has consistently worked, I'm not at all sure it's a plugin issue.

This is a serious problem as my students cannot access their information. I can't find a similar 404 issue on Toolset support forums. Sure appreciate you helping me take next steps in fixing!

Jim P.

#557921

Hi, I can see how this is a serious problem. I'll try to help as best I can. Please try these troubleshooting steps first:
- Temporarily deactivate all plugins except Types and Views, then activate a default theme like Twenty Seventeen. If you want to use a plugin like Maintenance Mode to disable the site from users while you're testing that will be fine. Resave your permalinks and test again in this minimum setup.
- If the problem is resolved, that indicates a conflict somewhere. Please activate your theme and plugins one-by-one until the problem is revealed. You may have to resave permalinks each time you activate another plugin.
- If the problem was not resolved, continue.
- Access your server logs to see if any errors are being thrown that could be causing your server to display a 404 message instead of the actual post. If you do not have access to your logs or know where to get them, 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 before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

Now try to load a student page again. If any errors are thrown, this will create an error_log.txt file in your site's root directory. Please send me its contents. Once that is done, you can revert the updates you made to wp-config.php.

I'll review your logs and determine how best to proceed.

#558000

Christian, many thanks for your quick reply.

I have traced the error to the recent Toolset Access plugin update, actually. Apparently, it no longer recognizes my network admin role when I attempt to access these (login-only) single CPTs, though it has no problem presenting me with the (login-only) archive view. I have registered myself as an admin on the offending site, and all now seems to work.

Jim P.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.