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

Last updated by Gerry 6 months, 2 weeks ago.

Assigned support staff: Bigul.

Author Posts
March 11, 2019 at 10:10 am #3309591

Gerry

I am trying to: show translated (duplicated) post on my posts page

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

I expected to see: all translated (duplicated) posts to appear, look at the English version of the above page for the expected result.

Instead, I got: only some translated (duplicated) posts appear -- the English and French version of the above posts page do not look the same

I checked for the missing translated (duplicated) posts in Translation Management, and I found that the status for these missing translated posts is already 'Translation complete'. All missing translated (duplicated) posts are also already published.

March 11, 2019 at 11:26 am #3310197

Gerry

The highlighted post in the attached images is an example of the issue I am seeing: the French version of the post does not appear on the French version of the posts page.

March 11, 2019 at 11:28 am #3310255

Gerry

Also, I already tried deleting the French version of an affected post, and then re-creating the French version by duplicating and also by using the classic Translation Editor (edit independently). Both approaches have the same result: the French version of the post still does not appear on the French posts page.

March 12, 2019 at 6:10 am #3318645

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

Please visit WPML>>Laguages and make sure *Adjust IDs for multilingual functionality* option of *Make themes work multilingual* is enabled.

Maybe it will be a compatibility issue. If possible, please switch for a moment to 2017 theme(after a backup) and check you are getting the expected result or not.

Please share with me the WordPress debug.log (not WPML debug information). Please check this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check you are getting any errors or warning related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).

--
Thanks!

Bigul

March 18, 2019 at 10:14 am #3367907

Gerry

Hello Bigul,

Thanks for your reply, and sorry for the delay in responding.

I followed your steps to get the WP debug log. Here is the link you requested https://pastebin.com/RxC82GJu (link will expire 1 week from today, 18-Mar-2019)

After setting up the WP debug log, I did the following:

1. I found that the order of some blog posts are not the same in English and in French -- the site is using Post Types Order https://wordpress.org/plugins/post-types-order/

2. So I fixed some of these ordering differences between English and French blog posts

3. I edited a blog post that had the ordering difference between its English & French versions
3.1. This blog post also had that ACF Image issue in my other question, by the way (https://wpml.org/forums/topic/new-acf-field-added-to-a-translated-duplicated-post-is-not-translated/)

4. I enabled show system fields - changed the system field 'version' of the ACF Image field from 'Do not translate' to 'copy' also

5. Update the post

6. The ACF Image field seems to work now, and this post I edited, which had been missing on the French version of the posts page, is now appearing on both English (default) and French version of the posts page

I will continue to perform some more tests to see, but it is most likely that this issue stems from the ordering differences between the English and French versions of blog posts.

For my info: is there WPML documentation that explains in detail what WPML does when I translate WordPress content?

March 18, 2019 at 5:28 pm #3371943

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. Happy to know you are getting the expected result now.

Please check the following documentation to know more details translating the contents with WPML and let me know your feedback.

https://wpml.org/documentation/getting-started-guide/translating-custom-posts/

https://wpml.org/documentation/getting-started-guide/translating-custom-fields/

https://wpml.org/documentation/translating-your-contents/

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

--
Thanks!

Bigul

March 21, 2019 at 2:43 pm #3407987

Gerry

Hi Bigul,

Thanks for your response.

I just want to note these down so at least there is an archive for what happened:

1. Without my knowledge, the SEO team had translated the URL and titles of some of the blog posts.
1.1. They also did a 301 redirection on page 2 of the French version of the posts page -- not sure why.
1.2. This resulted in the problem I described in this ticket: the translated posts not appearing on the French version of the posts page.

2. I did a re-ordering of the French blog posts, so the order of posts are the same between the English and French versions of the posts page.
2.1. I used the Post Types Order plugin for re-ordering posts.
2.2. The re-ordering seems to have fixed the issue of missing French posts.
2.3. I also deleted the 301 redirection on page 2 of the French version of the posts page - Redirection plugin

My questions:
a) Why, when updating a post in English (default), does the order of the French version change? The French versions are duplicates of the English posts.

b) The pastebin link I provided to you: did you find anything there that does not look right?

c) Thanks for the WPML doc links, but my question is more about the technical side of WPML ... is there a more technical documentation available about how WPML works, how it creates the translated post or page? I am curious about this, and I believe knowing this will help me investigate any issues relating to translations in the future, such as the change in order of post translations.

March 21, 2019 at 5:48 pm #3415435

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. The Debug log is showing the following error. Maybe it has happened while updating the Post.

WordPress database error Duplicate entry '5677-16' for key 'PRIMARY' for query UPDATE

So please update the post again and check you are getting this error in Debug log and Post Order is changing or not.

Meantime I will check about the technical docs our team and get back to you.

--
Thanks!

Bigul

April 12, 2019 at 1:34 pm #3599537

Gerry

The issues raised in this support ticket have been resolved, as per my earlier replies.

There are just some other questions that were brought up during the investigation, and I could just raise another support ticket for that.

Many thanks!