You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x ] I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened.
Our custom 404 page’s title displays correctly if the invalid URL is at the top menu level. BUT if the invalid URL is deeper at a sub-menu level, then instead of displaying the correct 404 page title, the title of the current post is displayed. Examples below.
We’re using X Theme and their X Custom 404 plug-in for a custom 404 page. When I deactivate Yoast SEO, the problem is resolved.
When I deactivate X Custom 404 plug-in, and instead install and activate 404page plug-in using the same existing 404 page, it too, has the problem, but then when I deactivate Yoast SEO the problem is resolved. Also tried setting a different existing page to be the 404 page with 404page; no luck.
When there is no custom 404 plug-in activated (i.e. X Custom 404 and 404page are both deactivated), the regular non-custom 404 page displays site-wide.
In Yoast SEO, Force Rewrite Titles was set to Disabled by default. When I try changing it to Enabled, the problem remains the same. (Another user on X Theme's support forum posted that they had the same issue and changing the Force Rewrite Titles solved it for them.)
Prior to posting in the Yoast SEO support forum, I posted a ticket with X Theme. Once we narrowed it down to Yoast SEO + X Theme, the support person confirmed that adding Yoast SEO to their test site replicated the problem on their end. Then they said since it's a plug-in issue I need to go to the plug-in company. I replied that actually it could be X Theme as well causing the problem - perhaps X is doing something in a non-standard way in the code for example - but that I'd try contacting Yoast. Then the support person replied that they "submitted this to our issue tracker so the developers will be made aware of it. They will also take note on this issue for them to have a further investigation."
Here is an entry from them earlier in that support thread before we narrowed it down to Yoast, that may help you narrow it down to a function - I'm not a coder so their screencast didn't make sense to me (and it's now deleted):
"Thank you for the credentials.
First I have check child theme, htaccess and with the same version of custom 404 with my test site and it is working.
Since the part that handles the title is this file:
wp-content\themes\x\framework\legacy\cranium\headers\views\ethos\ _landmark-header.php
I have made a copy of that file on your child theme here to check functionality:
wp-content\themes\x-child\framework\legacy\cranium\headers\views\ethos\ _landmark-header.php
I add a sample text to check if it is going to the correct filter. I can confirm it's correct. See this comparison: https://screencast-o-matic.com/watch/cbXjnt2XOY1. My test site is showing custom text and the correct page title but then your site seems to get still the post title. Something is happening from this function then the_title();.
Would you mind checking for a plugin conflict? You can do this by deactivating all third party plugins, and seeing if the problem remains. If it's fixed, you'll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time. Let's just see if there's something from the plugin that causing this issue. Let us know how it goes. The file is still there on your child theme but I remove the customize text so it will function as it is."
Please describe what you expected to happen and why.
I expected all page not found errors to display our custom 404 page no matter where they occur on the site.
How can we reproduce this behavior?
Examples of this on our site, where I’m appending abc here to force a 404 error –
Yoast SEO version: 5.7.1 (free version) while troubleshooting and documenting this. Just updated to 5.8 a moment ago and confirmed that the 404 page title issue is still there.
Relevant plugins in case of a bug: Yoast SEO
The text was updated successfully, but these errors were encountered:
When I look at your source code by going to view-source:http://nexlan.com/accountmate/modules/accounts-payable/abc we can see the output of our plugin with the correct title name:
Something else outputs the wrong title, see:
Therefore, I don't think this is an issue we are able to fix. If it is, we'd invite the developers of X-theme to work together with us on a fix. For now, I'm closing this issue.
For support questions you can always use the following channels:
Thank you. Just FYI - I updated my X Theme support forum thread to include this thread; also another X Theme user reported the same issue. X Theme replied 7 days ago, "I have submitted this to our issue tracker with the reference link to Yoast's response as well for further investigation."
Please give us a description of what happened.
Our custom 404 page’s title displays correctly if the invalid URL is at the top menu level. BUT if the invalid URL is deeper at a sub-menu level, then instead of displaying the correct 404 page title, the title of the current post is displayed. Examples below.
We’re using X Theme and their X Custom 404 plug-in for a custom 404 page. When I deactivate Yoast SEO, the problem is resolved.
When I deactivate X Custom 404 plug-in, and instead install and activate 404page plug-in using the same existing 404 page, it too, has the problem, but then when I deactivate Yoast SEO the problem is resolved. Also tried setting a different existing page to be the 404 page with 404page; no luck.
When there is no custom 404 plug-in activated (i.e. X Custom 404 and 404page are both deactivated), the regular non-custom 404 page displays site-wide.
In Yoast SEO, Force Rewrite Titles was set to Disabled by default. When I try changing it to Enabled, the problem remains the same. (Another user on X Theme's support forum posted that they had the same issue and changing the Force Rewrite Titles solved it for them.)
Prior to posting in the Yoast SEO support forum, I posted a ticket with X Theme. Once we narrowed it down to Yoast SEO + X Theme, the support person confirmed that adding Yoast SEO to their test site replicated the problem on their end. Then they said since it's a plug-in issue I need to go to the plug-in company. I replied that actually it could be X Theme as well causing the problem - perhaps X is doing something in a non-standard way in the code for example - but that I'd try contacting Yoast. Then the support person replied that they "submitted this to our issue tracker so the developers will be made aware of it. They will also take note on this issue for them to have a further investigation."
Here is an entry from them earlier in that support thread before we narrowed it down to Yoast, that may help you narrow it down to a function - I'm not a coder so their screencast didn't make sense to me (and it's now deleted):
"Thank you for the credentials.
First I have check child theme, htaccess and with the same version of custom 404 with my test site and it is working.
Since the part that handles the title is this file:
wp-content\themes\x\framework\legacy\cranium\headers\views\ethos\ _landmark-header.php
I have made a copy of that file on your child theme here to check functionality:
wp-content\themes\x-child\framework\legacy\cranium\headers\views\ethos\ _landmark-header.php
I add a sample text to check if it is going to the correct filter. I can confirm it's correct. See this comparison: https://screencast-o-matic.com/watch/cbXjnt2XOY1. My test site is showing custom text and the correct page title but then your site seems to get still the post title. Something is happening from this function then the_title();.
Would you mind checking for a plugin conflict? You can do this by deactivating all third party plugins, and seeing if the problem remains. If it's fixed, you'll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time. Let's just see if there's something from the plugin that causing this issue. Let us know how it goes. The file is still there on your child theme but I remove the customize text so it will function as it is."
Please describe what you expected to happen and why.
I expected all page not found errors to display our custom 404 page no matter where they occur on the site.
How can we reproduce this behavior?
Examples of this on our site, where I’m appending abc here to force a 404 error –
Correct custom 404 page title of Whoops! is displayed
http://nexlan.com/abc
http://nexlan.com/accountmate/abc
and a post, http://nexlan.com/trees-in-the-forest-of-reports/abc
Incorrect custom 404 page title that’s our most current post title, Year-End Capital Investment Planning, is displayed
http://nexlan.com/accountmate/modules/accounts-payable/abc and
http://nexlan.com/industry-solutions/manufacturing/abc
(Each time we add a new post, the newest post title becomes the incorrect 404 page title.)
Technical info
The text was updated successfully, but these errors were encountered: