Yoast Breaking Custom Post Type rewite rules
-
So I am using ACF and multiple custom post types to run a customized industry CMS.
Overnight I had an issue where the PAGE URL was returning a 404 Page not found error.
1. Cleared Permalinks several times
2. Recreated the page with a different name -loads fine.
3. If I revert the new page title & slug back to the original title & slug name I get a 404 error.
4. I thought there may be a conflict of categories slug and page slug with the same name.
I found one conflict and renamed the Testimonials category to a different name & slug – but this did not make a difference.5. I Narrowed it down to the YOAST plugin activation/deactivation.
If I deactivate Yoast – the original page URL that had the 404 error loads fine.I have had to roll back to Yoast 4.0.2
I have set up a complete staging site where I can swap between Yoast 7.5.3 & Yoast 4.0.2
When Yoast 7.5.3 is activated, Yoast creates 3 completely new rewrite rules for “example-ulr” in the database that were not there previously prior to activation.wp_options table > rewrite_rules
s:57:”(example-ulr)/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$”;
s:52:”index.php?category_name=$matches[1]&feed=$matches[2]”;
s:40:”(example-ulr)/page/?([0-9]{1,})/?$”;s:53:”index.php?category_name=$matches[1]&paged=$matches[2]”;
s:22:”(example-ulr)/?$”;
s:35:”index.php?category_name=$matches[1]”;
s:14:”category/(.+)$”;So at this point, I have rolled back to keep the CMS active on client sites.
I need to solve this issue be before upgrading eveyone.tested with WordPress 4.9.6 / WP 4.7.5
and in comination with PHP version 5.6 / 7.0.3 / 7.1.17 / 7.2.5
- The topic ‘Yoast Breaking Custom Post Type rewite rules’ is closed to new replies.