• Resolved Armsportstore.com

    (@armbreakersweden)


    Hi.

    I have a shop which is run with WPML and I use different URL’s for each language (built in feature in WPML).

    The homepage on the site is also the WooCommerce shop page. When I installed your plugin, everything was working and all three URL’s displayed the correct text and image for the shop URL’s.

    For some reason now the default language URL isn’t working any more. Your plugin send a canonical URL for this domain rendering the wrong image to show (site favicon…).
    For the two secondary languages/domains it works as intended.

    The default language/domain is Swedish: https://www.armsportbutiken.se/ (not working… When I check the sharing debugger, your plugin has set a canonical URL https://www.armsportbutiken.se/butik/ instead of using the actual URL which is https://www.armsportbutiken.se/ only. And this must have happened after the latest update, as this worked when I installed it a couple of months ago. And I did check the debugger for all domains at that point to check if my php code snippets for setting images etc was working.)

    Secondary language/domain in English: https://www.armsportstore.com/ (works fine, no canonical URL)

    Third language/domain in English(EU): https://www.armsportstore.eu/ (works fine, no canonical URL)

    Any idea on how I can fix this?

    By the way, appreciate a nice plugin, as I switched from another OG-plugin to this, as I never got that to work. So was very happy to see your plugin work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Armsportstore.com

    (@armbreakersweden)

    I think I managed to do a workaround to fix this issue. But would appreciate if you could check this anyway to possible avoid other issues.

    I added this codesnippet on my site:

    add_filter( 'og_og_url_value', 'my_og_url_value' );
    function my_og_url_value( $url )
    {
        if ( is_front_page() || is_home() ) {
            $url = __( 'https://www.armsportbutiken.se/', 'og' );
        }
        return $url;
    }

    I translated this string in WPML String Translation to catch the other URL’s too and it seems to work fine. The correct URL is being scraped by Facebook and the correct image is visible for all three domains now.

    Plugin Author Marcin Pietrzak

    (@iworks)

    hi @armbreakersweden

    I’m currently on vacation, but I will check it (in August). WPML is my favored plugin, then I try to figure it out and fix.

    Marcin

    Plugin Author Marcin Pietrzak

    (@iworks)

    @armbreakersweden

    I checked and I can not reproduce. I’m sorry.

    Marcin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change in behavior regarding canonical URL’ is closed to new replies.