Title: WPML problems
Last modified: June 9, 2020

---

# WPML problems

 *  Resolved [Pierre](https://wordpress.org/support/users/ierpe/)
 * (@ierpe)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wpml-problems-4/)
 * Hi,
 * I am having two problems between WPML and your plugin.
 * First, the canonical tag between the pages /home/ and /en/home/ had a problem.
   
   It was always showing the default version (fr), even on the EN page. Maybe because
   it’s the same slug ?
 * I quick fixed it using :
 *     ```
       add_filter('the_seo_framework_rel_canonical_output', function ($url, $id) {
         if (basename(get_permalink()) == "home" and "en" == apply_filters('wpml_current_language', NULL)) {
           $url = home_url() . 'home';
         }
         return $url;
       }, 10, 2);
       ```
   
 * But it’s not great…
 * Second problem with the schema.org structured data. It seems it’s always showing
   the default language (here it’s FR), even on EN pages.
 * Do you know how I could fix it?
 * Kind regards
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwpml-problems-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wpml-problems-4/#post-12962877)
 * Hello!
 * After some inspection, I found that there’s a URL-modification plugin active 
   on the site. This plugin seems to be the root of various issues on your website.
 * For example, look at any English non-homepage’s HTML source code, and you’ll 
   find that the `hreflang` tags on top have broken links. I believe that the homepage
   URLs (and all other broken URLs) will be rectified once that plugin is disabled.
 * I’m foregoing the Schema.org issue for now, because I’m not sure if that’s a 
   related issue. Feel free to follow up 🙂
 *  Thread Starter [Pierre](https://wordpress.org/support/users/ierpe/)
 * (@ierpe)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wpml-problems-4/#post-12964446)
 * Hi and thanks for your response.
 * I found that a configuration of the [Soil plugin](https://github.com/roots/soil)
   was creating some problems (We are using the Roots Bedrock WP stack). After removing
   the relative URLs configuration of this plugin, it fixed some things.
    It fixed
   the hreflang problems, not sure if you identified other problems.
 * But I still have the aforementioned canonical url problem between /home and /
   en/home, and the generated Breadcrumb schema data is still pulling some french
   content, even though the SEO data is filled with english content :
 * `<script type="application/ld+json">{"@context":"https://schema.org","@type":"
   BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"
   @id":"https://thesite.com/en/","name":"<strong>Conseil en optimisation du transport
   </strong>"}},{"@type":"ListItem","position":2,"item":{"@id":"https://thesite.
   com/en/home/","name":"Optimisation consulting of goods transport"}}]}</script
   >`
 * Where does the french “name” come from ?
 * Screenshots :
 * [https://ibb.co/ctzK5Yt](https://ibb.co/ctzK5Yt)
    [https://ibb.co/Kq9kXxv](https://ibb.co/Kq9kXxv)
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wpml-problems-4/#post-12973154)
 * Hello!
 * The URLs now look good to me on the front-end, even the `/en/home` one.
 * The breadcrumbs lead to the root page of your site–that’d be `/` for French and`/
   en/` for English. The script parser takes the title of that page to name it, 
   so you may want to look into adjusting the title settings for the root page(s)
   to correct them.
 * If you’re encountering other issues, you may find that toggling this setting 
   will fix them: “WPML > Languages > Make themes work multilingual > Adjust IDs
   for multilingual functionality”. I recommend checking that, even at the cost 
   of performance overhead.
 *  Thread Starter [Pierre](https://wordpress.org/support/users/ierpe/)
 * (@ierpe)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/wpml-problems-4/#post-12975985)
 * The EN canonical works only because of the quick fix I added (code in my first
   message). If I comment it, the canonical is still wrong. The quick fix is ok 
   for me, but there might still be a bug somewhere…
 * For the WPML option, it’s already on.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WPML problems’ is closed to new replies.

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Pierre](https://wordpress.org/support/users/ierpe/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/wpml-problems-4/#post-12975985)
 * Status: resolved