Support » Plugin: Yoast SEO » add_filter(page_link) no longer working as expected on breadcrumbs

  • Resolved Jonas Lundman


    After some update (since indexing “stuff” started) the wordpress core use of add_filter('page_link' … Doesnt work on breadcrumbs (parents) anymore. But using the internal WP filter _get_page_link() filter, works.

    Our theme and breadcrumbs filter on yoast has been working fine for years without problems, but now suddenly breaks.

    Is this related to some changes in Yoast breadcrumb building class? Or is urls cached somhow by the new indexing stuff?

    There is No information found about what the new tables exactly store, when its used, or what this “faster” new thing is doing, so we cant track the problem here by ourself.

    / Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Jonas Lundman


    EDIT, our team did report wrong, the internal filter _get_page_link() doesnt work either.

    Hi Jonas,

    Sorry to hear that the filter is no longer working. Since it’s a core function, the indexables update shouldn’t affect it the filter’s behavior.

    Can you describe or give us an example of how you were using the filter and what is breaking now?

    Can you confirm that this happens using the the site is using the latest Yoast SEO version (14.5)?

    Does this problem affect how breadcrumbs display or is the problem related to the schema data?

    Thread Starter Jonas Lundman


    Hi, thanks for looking into this.

    Lastes WP, Latest Yoast, only yoast active plugin. Running on our internal theme, since 2009…

    The situation example is: The second breadcrumb is a parent page, and the link to that parent page is filtered by standard filter ‘get_page_link’. The link get another url instead of its own url, in our case the href of the first subpage.

    This is a standard scenario. The breadcrumb class $crumb[url] variable by Yoast, has been working fine until now.

    The standard way of filtering permalinks get ‘sometimes’ lost when Yoast started to hard-core url by building their own index.

    However, on 2 installs; we de-activate Yoast, drop tables builded by Yoast, delete all options by Yoast, reinstalled Yoast. Enabled Breadcrumbs, and it worked fine!
    Until we clicked on “please index button”. One site worked – saved the correct filtered breadcrumb, but the other did not – saved without the filtered values.

    Both sites are identical (one live and the other is on dev server). After doing the same process again, deactivate, delete tables, activate. SOMTEIMES it works (correct filtered breadcrumb url) and sometimes dont.

    It seems like it depends how you “click around” before you do the “indexing”. We get no consistance of this…

    We can see inside sql dump the url is saved different for that page/ crumb, from time to time.

    This is not a happy situation if we cant rely on standard filter of url when crumbs building up. And everything has been working fine until that green button arrived…

    Plugin Support devnihil


    @intervik Thanks for the additional information.

    On your staging/development site, can you please let us know whether the issue still occurs when using a default theme such as TwentyNineteen and only the Yoast SEO plugin active?

    Plugin Support devnihil


    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

    Thread Starter Jonas Lundman


    We solved the problem by remove all Yoast options and re-index again did the trick on old installs. We cant reproduce the problem anymore on new installs. Marking this as solved for now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘add_filter(page_link) no longer working as expected on breadcrumbs’ is closed to new replies.