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 9 replies, has 2 voices.

Last updated by Diego Pereira 9 months ago.

Assigned support staff: Diego Pereira.

Author Posts
December 21, 2018 at 4:47 pm #3025649

bertP

I am trying to: Site originally in English and I am in the process of translating it into German and Spanish. Because I have not completed the translations yet, I have the two languages hidden.

Link to a page where the issue can be seen: hidden link

I expected to see: Everything in the "draft" translation hidden while the languages are hidden in settings, including the image page URLs

Instead, I got:
I have been working with Jetpack staff because the sitemap they generate for me contained 404 errors for URL pages for duplicate images. In the media gallery there were no duplicate images so I did not understand why I was getting duplicate images and page URLs in the sitemap.
After working for a few days with Jetpack trying to narrow the source of the problem we have concluded that the 404 errors were due to the WPLM plugin. With the plugin disabled: I can see duplicate images in the media gallery AND the URLs returning 404 errors work fine after disabling the plugin.
IMPORTANT: The plugin is currently disable to avoid 404 errors in the image sitemap.

Is there a way to fix the 404 page errors e.g. hide those URL, when having the languages hidden while working on the translations? Am I missing something?

Thank you.

December 24, 2018 at 10:14 am #3030122

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @bertp, welcome to the WPML support Forum!

This seems to be a new compatibility issue. In these cases, these are the procedures:
- Install the theme/plugin in a clean installation and reproduce the problem in this new installation. So we can isolate it and do some testing without the interference of server settings or other plugins
- After this, I will check the problem in this new installation and look for a quick solution
- If I can not find a solution, I will forward the problem to our compatibility team
- The compatibility team will do some more testing and will contact the product author to fix the issue

I created a test website with a clean WordPress install. You can access it through this link:
hidden link - Through this link you will be automatically logged in.

Please upload the plugin to this test install, setup it the same way as in your website (using the same options) and create some dummy content to reproduce the issue. Please note that we only need the plugin and the related functionality, you don't need to setup a entire website or clone your existing site. The fewer plugins the better.

After that, please send us clear steps on how to see/reproduce the issue on this test install. We will run some tests.

A quick solution for this issue is to use the sitemap generated by the YOAST plugin, which is 100% compatible with WPML: https://wpml.org/documentation/plugins-compatibility/using-wordpress-seo-with-wpml/

All the best,
Diego

December 27, 2018 at 11:09 am #3036548

bertP

Hi Diego, thank your for your support. It is not clear which plugin I have to install in the sandbox site that you have provided. You mentioned the fewer the better. I have a few and I do not know which one is creating the problem. I have installed a couple of them, the basic free version (I have the pro versions). I am running the latest version Avada theme but I do not know if I can place a copy in the sandbox.
I have activated the WPML in my site again and I have turned on the "Reporting to wpml.org" the plugins I am using for you to check.
The settings of WPML are close to what I have in my site (I also translated the theme in my site).
Originally I had the "duplicate existing media for translated content" and "duplicate the featured images for translated content". Is this what has created all the duplicate attachment URLs? Now I do not know if deleting all the duplicate images (in my media library, which I only see when I deactivate the WPML plugin) would messed up the translations or featured images being displayed in blog carousels, etc....
I have no idea about coding and try to make my life easier with whatever I install in my site.
Kind regards,

December 27, 2018 at 11:52 am #3036681

bertP

Hi Diego,
I have deactivated WPML in the sandbox and I see one of the images I added to a post/page. I have attached two images, one from the sandbox, and the second one from my site.
After i deactivate the plugin, in the Sandbox, the images are attached to the corresponding language page. In my site, the show unattached.... I do not know if this can give you a tip of what's going on. I do not know why in my site they show unattached.

December 27, 2018 at 3:02 pm #3037347

bertP

Following my previous message, If I try to attach the image to the Spanish or German translation, the translated post/page does not show in the list

December 27, 2018 at 3:28 pm #3037436

bertP

With the WPML deactivated, In the sandbox I see the the post/page in the default language AND also additional pages for each language. I do not see that in my site (with the plugin deactivated). I only see post/pages in the default language (English), but I do not see the Spanish and German.

December 27, 2018 at 5:09 pm #3037989

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

As the sitemap is generated by the jetpack plugin, we need to install only the jetpack plugin, then create some dummy content to reproduce the issue - basically upload some images and generate a sitemap to see if it also contains the 404 errors. No need for the enfold theme or the other plugins.

Regarding the image attachment issue, please try the following:
- Go to WPML > Settings
- Scroll down to Post Types Translation and check if the Media (attachment) post type is set as "Translatable - only show translated items"
- Scroll down to "Media Translation", mark all checkboxes fields and click on "Start" to run the media scan

IMPORTANT: Please backup your site first before making any change, this is important for security reasons.

Kind regards,
Diego

December 29, 2018 at 3:37 pm #3042311

bertP

Hi Diego,
I have been able to replicate the issue in the sandbox. I may be wrong, but I think that the problem is within WPML and not with Jetpack or any other plugin.
I have the post set to translatable because I would like to translated them eventually. I simply have not had the time to translate them. So this is the issue:
- Plugin WPML is activated
- Default language is English. The other secondary languages are German and Spanish (they are currently set to "hidden")
- We have a few published posts, all of them translatable and with the boxes tick for "Duplicate uploaded media to translations" and ""duplicate featured image to translations"
- I have not even started the translations (but the images have been duplicated)
- I have installed Jetpack and it has generated an image-sitemap: hidden link
- In the case of the the post that has not been translated (translation not started), the images have been duplicated for each language.
- The attached image shows the sitemap with the 3 images of the example. If you click on the image attachment URL, you get a "page not found" : hidden link
- For some reason, both the image and the attachment URL are visible in the sitemap, but they are not linked.
- If the secondary languages are hidden while working on the translations, why are the images and corresponding attachment URLs visible to the sitemap generator?
- If you disable the WPML plugin, the URLs (that were returning "page not found") do work.
I think that that I have not forgotten any detail. Please let me know if you need additional information.
Thanks!

December 31, 2018 at 12:18 pm #3045194

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks, it seems that WPML modifies the URL's of the attachment pages, to make it works multilingual. However, jetpack lodas the default attachment URL's (not the ones generated by WPML).

I forwarded the details to our Themes and Plugins Compatibility Team and they will take a look at the issue and contact the author if needed. We will send a feedback soon.

Kind regards,
Diego

January 18, 2019 at 4:13 pm #3106769

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Unfortunately the sitemaps generated by Jetpack are not compatible with the multilingual URL's generated by WPML. We tried to find a workaround but it'snot possible (it's necessary to do some modifications in the jetpack plugin, which is not ours).

As an alternative, I recommend to use the YOAST SEO plugin to generate the sitemaps (as it's 100% compatible with WPML).

Kind regards,
Diego