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

Last updated by Andreas W. 1 month, 3 weeks ago.

Assigned support staff: Andreas W..

Author Posts
August 22, 2019 at 5:41 pm #4441901

colinS-7

Hi I am trying to post some articles the featured image does not get copied on the translated postr

August 23, 2019 at 1:06 am #4443257

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for contacting the WPML Support Forum.

Please open one of your articles on the WordPress Editor in default language.

In the right sidebar you should see a section called "Language". Beneath the options for translating the content there are two checkboxes. In order to translate the featured image you will need to mark the repective checkbox and update the content.

If the featured image still will not appear on the translated page please retranslate the content.

You will find also a global setting for duplicating the featured image for all translations at WPML -> Settings -> Media Translation Section.

Let me know if this solved the issue.

Kind regards
Andreas

August 26, 2019 at 12:32 am #4455355

colinS-7

This does NOT work... I have checked both options repeatedly, saved the post again and the image is never copied. The only way to get the copy to work was adding the following:

add_action('icl_make_duplicate', 'my_copy_feature', 10, 4);
function my_copy_feature( $master_post_id, $lang, $postarr, $id ) {
$feature_id = get_post_thumbnail_id( $master_post_id );
set_post_thumbnail ($id, $feature_id);
}

It would be great if WPML had a more reliable media copy or even an option to copy media from a specific post.

August 26, 2019 at 2:30 pm #4459773

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Did you try translating the post again, after activating the options and updating the content?

Hello,

For more information about how to translate Media with WPML please have a look into the following documentations:

https://wpml.org/documentation/getting-started-guide/media-translation/

https://wpml.org/2018/06/important-changes-in-how-media-translation-works-since-wpml-4-0/

If the duplicate media function provided on the WordPress Editor sidebar will not work as expected, then the website might be handling a compatilbity issue.

Could you please try to run the site in minimal setup to see if the issue persists?

Please disable any additional plugin that is not related to WPML and its add-ons. If the issue disappears please start reactivating any plugins, or activate them in small groups. This way please verify at which points the issue appears again to indicate the plugin that is causing the issue.

Also please change to a default theme like TwentySeventeen to see if the issue might be theme related.

Further, you could enable the wp-debug feature to see if there are any current PHP errors given.

Add the following to your wp-config.php file:

define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

If you open wp-config.php and that define statement is not there, you can add it right before this line:

/* That's all, stop editing! Happy blogging. */

As long any PHP warnings, notifications or errors are given you should be able to find a complete report inside of your wp-content folder. Look for a debug.log file and provide me the results.

More information about how to activate this feature you can find here:
https://wpml.org/documentation/support/debugging-wpml/

Kind regards
Andreas

August 26, 2019 at 3:17 pm #4460105

colinS-7

We tried the using the WP 2019 theme, no impact and debug as described. We received no error messages or indication as to why WPML is not duplicating the media...

We also deleted WPML and re-installed from scratch with WPML 4.2.6 with no change in behaviour. We will attempt again with 4.2.7 but the change log has no indication that the media duplication functions have been adjusted...

The site is otherwise 100% functional with the images appearing properly on the frond-end and in the WP backend. There are no notable errors in the error log...

August 26, 2019 at 4:11 pm #4460291

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

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.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

Please make a backup of site files and database before providing us access.
If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Kind regards
Andreas

The topic ‘[Closed] Post featured image not being copied’ is closed to new replies.