• Resolved Jory Hogeveen

    (@keraweb)


    Hello,

    I’m using Yoast in combination with The Events Calendar and Polylang.
    This installation has several languages, one of them is Spanish.
    I’ve set the events/event-category breadcrumbs to include the main events archive page.

    When visiting an event or event category page the archive page shows in the breadcrumbs, but only in Spanish, not in other languages.

    I’ve already did some debugging and found that the indexer from Yoast indexes the Spanish breadcrumb title (no idea why).
    The post type object itself is correctly in English.

    When looking inside the indexable table in the database I see that all post type archives are indexed incorrectly. Yoast only indexes a single language and the actual translations are also mix-mached. For example, I see Spanish and French URLs combined with English or other languages as breadcrumb title.

    It seems that the Yoast indexer is incompatible with translation plugins like Polylang. Is there a workaround for this?

    Cheers, Jory

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello Jory,

    Thanks for reaching out but what you have described is quite abstract. Please provide screenshots and URLs that highlight what you experienced.

    Thread Starter Jory Hogeveen

    (@keraweb)

    Hello @maybellyne

    I’m not sure how to make this less abstract as an indexer tool is always a bit abstract but I’ll do my best.

    Yoast SEO includes an indexer that basically caches information in the database to speed up it’s features.
    See table PREFIX_yoast_indexable
    This table contains information like the URL, ID, object type, sub type, parent, author, title, description etc.

    The class instance for the breadcrumbs (and probably other features) uses this table to fetch it’s information for the breadcrumbs, link the URL and title.

    This works great for most object types. Posts, Terms, etc. all work fine.
    However, Post archives are a bit of a unique part of the WordPress ecosystem in that these are not editable by default for a user.
    The page titles for these archives are made from the Post Type object labels used when registering the post type.

    Now here is the issue/bug. Since a post type archive isn’t editable it seems the Yoast indexer also doesn’t query for the indexed data the same as it does with posts and terms.

    When using a translation plugin like Polylang these post type archives are translatable, but the Yoast indexer doesn’t seem to take this into account when indexing.
    Few indexed examples:

    CPT 1 archive
    permalink: domain.com/spanish-cpt-archive-url
    breadcrumb_title: French Title

    CPT 2 archive
    permalink domain.fr/english-cpt-archive-url
    breadcrumb_title: Spanish title

    Basically, Yoast only indexes a single item for a CPT archive, not on a per-permalink basis. Translated permalinks aren’t indexed.
    But… on the front-end it does load the incorrectly made indexed values!
    So you would have (for example with The Events Calendar)

    Home > Eventos > Event category > Event

    Where in the example “Eventos” is the Spanish CPT archive title, not the English one.

    Here it seems to set the indexed values: https://github.com/Yoast/wordpress-seo/blob/trunk/src/builders/indexable-post-type-archive-builder.php#L76

    My first guess would be that the permalink_hash isn’t set correctly and this it doesn’t recognize that it’s a new page. Keep in mind though that while the slug might be the same, the domain (in this case) is always different so I would expect that the permalink_hash is also different.

    Let me know if it’s more clear now!

    Cheers, Jory

    Plugin Support Maybellyne

    (@maybellyne)

    Thanks for the detailed explanation Jory.

    We have a similar report here of wrong indexation data with multilingual plugins; it started with WPML but it was discovered it could apply to others like Polylang. Our product team is aware and you can follow the progress.

    Thread Starter Jory Hogeveen

    (@keraweb)

    Hi @maybellyne

    The issue you’ve mentioned is reported in May 2020, almost 4 years ago, any idea/indication as to when this will be fixed? It seems that this doesn’t have priority at all.

    Since this isn’t provided on GitHub, what would be the best way to handle this in the meantime? Can the indexer be disabled for example? I cannot find anything in the documentation to disable the indexer for post type archives.

    Thanks, Jory

    Plugin Support Maybellyne

    (@maybellyne)

    Hello Jory, I don’t have updates on the prioritization or a workaround to help in the meantime

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Breadcrumb CPT archive translation issue’ is closed to new replies.