This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 13 replies, has 2 voices.

Last updated by Bruno Kos 3 months, 3 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
June 12, 2019 at 9:10 am

ashutoshB

I am trying to:

WPML has been working on the site since 6 months on a compatible theme (Newspaper by TagDiv). We have some secondary languages with untranslated content, as per the instructions in this support document

https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/

We had the settings set up as advised in post type translations, for posts we are using Translatable - use translation if available or fallback to default language (See image 1 Post type translations)

This was all working well and the primary language posts when switched to a secondary languages would show a post with a canonical set for the primary.

However recently we noticed in analytics that we were also getting traffic (organic) on the secondary language posts as well. When we checked we found out that the secondary language pages did not have a canonical pointing towards the primary page and so both are getting indexed and creating a duplicate content issue that is affecting our ranking 🙁

PFA the screenshots for one URL as an example.
hidden link

1 Primary language page - Shows the primary url

This is the auto generated URL for a 2nd language (Hindi)
hidden link

Checked the canonical url: see screenshot 3 canonical url for 2nd post
The url canonical url instead of pointing to the primary is the secondary so these are both being indexed.

I investigated and found out that you tell Yoast SEO plugin (compatible) that is used to set the canonicals that url so there seems to be an issue with yoast and WPML

Please help us out with this! We are losing rankings because of this problem.

I do not want to disable this feature as this will affect UX

June 12, 2019 at 1:40 pm #4004829

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

I have checked both links and can see the issue - canonical link being different, even though these are the same posts (and should be the same, based on the settings).

May I ask you that you try to emulate the same thing on our clean sandbox? I have installed all the required plugins and configured them. You will find all the sandbox information in the next reply.

There is one thing to try before that, though. I can see that you did not install this plugin:
https://wpml.org/download/yoast-seo-multilingual/?section=changelog

It serves as a "glue" between Yoast and WPML. It has been published recently, so this is most likely the reason why you have not installed it yet. It basically contains the compatibility code between the plugins.

Can you install it, clear the site caching (if any) and try opening these links while checking the canonical urls?

Regards,
Bruno Kos

June 12, 2019 at 1:41 pm
June 13, 2019 at 4:48 am #4009449

ashutoshB

Hello Bruno

Thanks a lot for your reply and for looking at this.

As instructed, I installed the Yoast Multilingual plugin and activated it, cleared caches and tested this but it does not work.

Checked the page
hidden link

Hindi (2nd language) translation link is
hidden link

Checked canonical and it is the same and not pointing to the original page.

Check image - Calonical after yoast

So apparently a new page has been created which is causing a duplicate content problem.

hidden link

So this did not solve the issues.

I have accessed the sandbox demo installation. What do you want me to do now, please let me know?

Regards
Ashutosh

June 13, 2019 at 4:54 am #4009481

ashutoshB

Hello Bruno

I got access to the demo account that you have set up. This is a plain installation.

Please remind me what I need to do? Should I install duplicator on my original install and import it to the sandbox?

Regards
Ashutosh

June 13, 2019 at 8:21 am #4010455

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Please remind me what I need to do?

Please try to emulate the same behavior here - so create 2-3 pages, set pages to have the "Displaying Untranslated Content in 2nd Languages" option (in other words, make them appear as translated) and check if canonical links also wrong or not.

Don't use your theme or any other plugin - make sure to use any of default WordPress themes such as Twenty Nineteen. This will help us exclude any theme/plugin/server related issue on your website and if show the same thing on the sandbox, we will know that this is indeed a WPML bug and I will bring this to our developers.

Regards,
Bruno Kos

June 13, 2019 at 11:51 am #4012463

ashutoshB

Hello Bruno

Thanks a lot for your explanation. Apologize my noobness

The theme was already 2019 so added two posts as they are in our set up i.e with permalinks /category/post-name

Set up categories and translation (in WPML taxonomies)

hidden link

hidden link

Set up the WPML setting as it was in our site and temporarily enabled the indexing (yoast does not add a canonical if the site/page is no index.

Switched to Italian (2nd language) and checked the canonical url which is as it should be

So for

hidden link it is hidden link and so on

The canonical url generated is what it is supposed to be, i.e this is not a WPML bug, probably has to do with the theme.

We are using the most popular theme on themeforest, Newspaper theme by TagDiv which lists WPML as a compatible plugin. We are only using compatible plugins.

We had a compatibility issue in the past as well which was sent to the compatibility team.

Please advice what needs to be done. 🙁

Regards
Ashutosh

June 13, 2019 at 12:44 pm #4012973

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I have checked that ticket we had several months ago and you said that you cannot install this theme on our sandbox installation due to licenses. Is this still the case?

Because the next step we should try is to install the theme on our sandbox and see if the issue is the same as on your website, since we have proven that it is not related to WPML itself, but most likely a theme compatibility issue.

Maybe you could even ask the theme support for this, so that they can install it on our sandbox and use it freely for their testing, because the last time they were contacted directly by us and said that they would resolve the issue in one of the next theme updates.

Regards,
Bruno Kos

June 14, 2019 at 8:53 am #4019651

ashutoshB

Hello Bruno

Thanks a lot for looking into this.

I have had a rather bad experience with the theme authors as they have not resolved the earlier issue that I had with the theme compatibility with WPML. We had purchased the theme only because they claimed that it was 100% compatible with WPML, which it is not apparently.

Could you please reach out to the theme authors. It is one of the best selling themes on themeforest so compatibility issues may be affecting other users using WPML.

Also, I think that this feature is too much trouble so we should just go ahead and change the setting to choose, only use translated items.

I recall that this will cause duplicate posts that need to be deleted. Could you please advise what is the best way to do this without causing ranking issues?

I thank you again for your help. I do want to say that it is so disheartening when claims of 100% compatibility are made by themes at the time of sales and then this does not come out as true. 🙁

Regards
Ashutosh

June 14, 2019 at 10:15 am #4020417

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I've reported this case to our compatibility team. However, there is one thing I'd like to ask you to try on our sandbox installation. Could you try translating (or auto generating) the slug of the "translated" page to be the same setting as it is on your website?

Because the auto generated URL on your site has this:
hidden link

So it has special characters - I am trying to exclude if this is the case (perhaps a WPML bug with special characters with canonical URLs).

Let me know if I'm not completely clear on what I'm asking.

Regards,
Bruno Kos

June 14, 2019 at 12:41 pm #4021507

ashutoshB

Hello Bruno

Thanks for the suggestion. I understand what you are saying. We are using Hindi and other Indian languages show as strings of special characters in places.

So in the sandbox setup I set up a secondary language as Hindi. Added Hindi category and then checked the two posts that had been set up

hidden link

hidden link

Switched to Hindi

Translated URLs are

hidden link

and

hidden link

Checked the canonical (Check image)

and checked the canonical which are okay so this is not an issue with the special character URLs

Thanks a lot for this suggestion. You are very thorough with troubleshooting.

I want to know that if I disable the feature of auto creation of translation by selecting that option Translatable - only show translated items in the Post translation do I need to delete the duplicate posts and if yes, how?

This seems to be too much trouble so it is better not to have any auto translation posts.

Thanks a lot for forwarding this to the compatibility team. You guys are awesome!

Regards
Ashutosh

June 14, 2019 at 1:44 pm #4021921

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I want to know that if I disable the feature of auto creation of translation by selecting that option Translatable - only show translated items in the Post translation do I need to delete the duplicate posts and if yes, how?

You cannot delete these posts - duplicates - because they actually don't exist, if you check the code, you will see that both are actually the same, based on the page ID in the <body> element.

But I guess that for now, until we possibly find the solution for this, you could set only to show translated content.

I forwarded the message to a compatibility theme that we are unable to test your theme on our clean install due to licenses, so hopefully the theme developer will help us test this in their own environment or at least provide a test license.

Regards,
Bruno Kos

June 17, 2019 at 7:13 am #4032613

ashutoshB

Hello Bruno

Thanks for your reassurance. Disabled the feature and now the posts are set for 'Only show translated items'
As predicted the duplicate post redirects to the original so the double posts indexed by Google should also be fixed.

Thanks a lot for your cooperation. I would be waiting for a solution for this issue.

Best regards
Ashutosh

June 17, 2019 at 11:44 am #4035045

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for confirming (also changing the ticket status).

Regards,
Bruno Kos

June 26, 2019 at 12:14 pm #4092357

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I have received information from our compatibility team that they are not able to replicate this in a clean installation using the theme.

Could you create a Duplicator of your website so that I pass them? They would like to investigate your setup and see the issue there.

I would need duplicator where the issue is visible, so it will be great if you could set it up in that way and create a package then. I have marked your next reply as private so that you can send me WordPress credentials (in case they have been changed since this ticket has started). I will download the packages then.

Regards,
Bruno Kos

The topic ‘[Closed] Displaying Untranslated Content in 2nd Languages – Incorrect Canonical’ is closed to new replies.