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.

Author Posts
February 15, 2020 at 4:15 am #5498181

rafalP-12

Tell us what you are trying to do?
I tried to make Polish translation of product in English, but after copying everything images does not show.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
I made video:
hidden link

What is the link to your site?
hidden link password: wsad

February 17, 2020 at 12:39 pm #5507709

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hello,
Thank you for contacting WPML support.

1.- I would like to ask you to follow this steps:
- Create a full backup of the site.
- Go to WPML -> Settings -> Post Type Translation -> Unlock Media and set it to 'Translatable – use translation if available or fallback to the original language' -> Save the changes.
- In the same Settings page scroll down to Media Translation -> Select all options in the second sub-section and click 'Save' button -> Then Select all options (no worries if the first one is disable) and click on the 'Start' button -> Wait for the process to finish.
- Edit the product in the default language -> Make a small change in the content -> Save the changes -> Update the translation.

Could you tell me if the issue persists?

2.- Please increase the PHP Memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:`

/** Memory Limit */
define('WP_MEMORY_LIMIT', '128M');
define( 'WP_MAX_MEMORY_LIMIT', '128M' );

- Add it above the line /* That's all, stop editing! Happy blogging. */

Kind regards,
Carlos

February 17, 2020 at 5:55 pm #5509855

rafalP-12

Hi, the issue still persist.
Here I made video of full process how I add product and that the photos are not uploaded to WordPress. So any chance to make it work?
hidden link

Regards,
Rafal

February 18, 2020 at 12:31 pm #5515137

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi Rafal,
Thank you very much for sharing the screencast.

Could you tell me if you followed the steps I recommended in my previous message?

Regards,
Carlos

February 18, 2020 at 2:44 pm #5516361

rafalP-12

Yes this video is after making these steps you mentioned.

February 18, 2020 at 4:06 pm #5516983

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,
Thank you for your confirmation.

In this case I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Regards,
Carlos

February 19, 2020 at 11:23 am #5523071

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi Rafal,
Thank you very much for the information provided.

I went to WPML -> Settings -> Post Type Translation and set Media to 'No translate' and saved the changes. Now the images seems to be shown correctly on the translated product.

Please create a new product and double check if the issue persists?
Regards,
Carlos

February 20, 2020 at 12:00 am #5528205

rafalP-12

Hi, not working for me.

hidden link

Regards,
Rafal

February 20, 2020 at 11:48 am #5532605

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi Rafal,

I set the gallery field to be copied so the images in the gallery are going to be copied while translating the product. You can see it in this video: hidden link

In the video I also used the option of 'Overwrite content' which is basically a duplication of the content, and then I used the 'Translate independently' option to de-attach the Polish version.

In any case, the issue remaining is with the featured image and I suspect it's happening because this featured image is not being saved in the Media Library. I kindly ask you to check if the featured image is in the Media Library and if you find it, please re-save it and double check if the issue is solved.

Regards,
Carlos

February 21, 2020 at 5:24 am #5537877

rafalP-12

Hi,

Yes the gallery is really there in Polish translation, earlier it was not, don't know why. But featured image not there despite it is in gallery. I made video to show you. I tried to update it there, but with no luck. In English version is featured and gallery, but in Polish version it is only the gallery.
hidden link
The featured image is saved in Media Library as show on video, but it is not visible in the Polish translation.
Any other options to make it work?

Regards,
Rafal

February 21, 2020 at 11:52 am #5540067

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi Rafal,

I went to WPML -> Languages -> Language URL Format and selected 'Different languages is directories' option because the 'Different domains per languages' was throwing some configuration errors, so I activated the first option to rule out this as a possible cause and for the sake of the testing process.

After consulting our specialists about this issue, I have found a workaround provided for this same plugin that I would like to ask you to apply. Please follow this steps:
- Edit the functions.php file which is within your theme's folder and add this code at the end:

add_filter( 'wp_get_attachment_url', 'fix_remote_attachments', 10, 2 );
function fix_remote_attachments( $url, $id ) {
    $file = get_post_meta( $id, '_wp_attached_file', true );
    if ( 'http' === substr( $file, 0, 4 ) ) {
        $url = $file;
    }
    return $url;
}

- Save the changes and check if the issue persists in a new imported product.

Looking forward to your message.
Regards,
Carlos

February 22, 2020 at 4:18 am #5545183

rafalP-12

My issue is resolved now. Thank you!

February 22, 2020 at 7:21 am #5545433

rafalP-12

I still have some problems, need more testing will write later about it.

February 22, 2020 at 7:00 pm #5547045

rafalP-12

Hi,

I restored website from backup to check the problem with different domain for translation, and it did not work, after making changes mentioned here, did you do something else that is not mentioned here?

Regards,
Rafal

February 24, 2020 at 11:31 am #5553819

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,

I apply only the steps described in my messages.

Regards,
Carlos