• Resolved frostydog

    (@frostydog)


    Hi. Suddenly, TSF is not adding the correct URL to the canonical tag.

    Not sure why this is happening but its happening everywhere on my installation.

    For example, if the URL is: https://domain.com/2019/03/title-of-the-post

    The canonical URL added inside the canonical tag is just: title-of-the-post, deleting the domain and path.

    We haven’t done anything, it just happened. We have the latest version of the plugin. Thanks a lot!

    • This topic was modified 5 years, 10 months ago by frostydog.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    If the “incorrect” example.com/post-name/ URL is entered in your browser, does it redirect you to the “correct” URL: example.com/year/month/post-name/? Or vice versa? If it doesn’t, is the right content displayed, and is the URL the same on either page?

    Also, have you updated any plugins or themes lately?

    Now, for the URL generation for posts, The SEO Framework mostly relies on WordPress’ permalink functionality, without doing any magic to the path. So, the canonical URL would be incorrect without TSF, too. This makes me wonder if another plugin randomly fiddles with it. So, do double check your permalink settings at /wp-admin/options-permalink.php.

    In any case, I can only assume from here; so, if you have a URL for us, that’d be very helpful! Cheers ??

    Thread Starter frostydog

    (@frostydog)

    Yes, if I do what you say, it redirects to the correct URL.

    I manually generated a canonical URL with WP tags and I get the whole path. Yes I updated TSF plugin recently ??

    Do you mind if I send URLs privately? ??

    • This reply was modified 5 years, 10 months ago by frostydog.
    Plugin Author Sybre Waaijer

    (@cybr)

    Hello again!

    The redirection is a good, although not optimal, signal, yet Google should assume that that’d be the right content to display.

    In any case, yes, you can share that confidentially via my contact page. Cheers!

    Thread Starter frostydog

    (@frostydog)

    For the moment we fixed it replacing the_seo_framework_rel_canonical_output with the_seo_framework_ogurl_output in

    autodescription/inc/classes/render.class.php

    Now it works. Let me know if you need me to send you all the edits we did ??

    Plugin Author Sybre Waaijer

    (@cybr)

    Hmm, so you just changed the filter name? That would mean that another piece of code active on your site is fiddling with the first filter: the_seo_framework_rel_canonical_output.

    If you import all plugins via FTP to your computer and use a deep code-search via VSCode or Notepad++, look for the the_seo_framework_rel_canonical_output filter in all plugin files.

    If you find anything that’s not related to The SEO Framework using it, I’d be glad to know; so I can forward a patch. So you no longer have to be afraid of updating (and losing your changes).

    Thread Starter frostydog

    (@frostydog)

    Ok, let me do that and I’ll get back to you ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Huge problem with canonical URLs, wrong URL’ is closed to new replies.