• Resolved gabriellanglois

    (@gabriellanglois)


    Hi,

    I have a problem with Yoast indexable for quite some time with multiple sites, I have rewrite rules for custom post type and taxonomy structure for WPML translated archive page. Everything works fine unless we save a taxonomy term or a single post type. The indexable seems to trigger after saving a post and cause 404 only on the translated page. I need to save the permalinks each time to fix the 404.

    I tried to reindex the indexable via WP-CLI wich cause 404 just like saving a term or post type. I also tried to debug in the core plugin files, I found that commenting a line in the set_started function insinde indexing-helper.php fix the 404 issues but I don’t want to always comment this line in the core files. Are you already aware of this issue, I was waiting for a fix but I had this problem for over a year so any help will be appreciated.

    Here’s a video of the problem and the plugin file fix : https://www.loom.com/share/4cbed6f63e0b4cdcb7c505488653e527?sid=93e738a7-cb86-4dde-a0f8-75504f01a9f3

    Thank You!

Viewing 2 replies - 1 through 2 (of 2 total)
  • @gabriellanglois

    The indexable gets updated when there’s actions like page refresh, edit and create posts/pages. I understand it’s causing 404 only on the translated page.

    Did you try doing optimization from the admin dashboard and check if that resolves?

    Can you please try resetting our indexables in the database tables by following the steps below?
    1. Install & activate the?Yoast Test Helper plugin
    2. Go to Tools > Yoast Test
    3. Hit the “Reset indexables & migrations” button.
    4. Go to SEO > Tools, and under SEO data, click the “SEO Data Optimization” button to allow Yoast to rescan your pages.

    We look forward to hearing from you.

    Thread Starter gabriellanglois

    (@gabriellanglois)

    Hello,

    Thanks for the reply, after investigating even more, I found that the problem was in fact inside my rewrite rules, when the indexable start, it seem to refresh the rules. When I generate the translated URL in the rules, I use get_term function to find the translated term but for some reason, it return always the term in the default language, the fix was to switch lang with the wpml switch_lang function inside the loop of each lang before getting the term, so the rewrite rules was succesfully created.

    I consider this topic resolved. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Yoast Indexable 404 on WPML translated page’ is closed to new replies.