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

Last updated by Amir 6 years, 1 month ago.

Assigned support staff: sarah.n.

Author Posts
July 18, 2013 at 8:40 am #146133

Amir
Supporter

Are using version 2.9 and you have noticed duplicate content on your site's front-end?

Our developers are addressing this and other 2.9 issues as we speak in order to release 2.9.1 as soon as possible.

Thank you for your patience!

July 19, 2013 at 6:37 am #146485

Maximilian

When will the update be available? This is really a major Bug, that destroys the complete Layout!

July 19, 2013 at 7:38 am #146514

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

Hello Maximilian,

We have a temporary workaround for this. You have two ways to implement the fix.

1. Either add the following in your theme's functions.php file:

add_filter( 'icl_ls_languages', 'fixing_bug' );
function fixing_bug( $languages ) {
wp_reset_query();
return $languages;
}

2. Or open sitepress.class.php, find the get_ls_languages() function and add the following right before the return $w_active_languages; at the end of the function

wp_reset_query();

If you use the first method of adding the function in your theme's functions.php file please remember that this is only a temporary workaround so when you see announced that a specific WPML update (2.9.1) resolves this bug you will have to remove this function from your theme.

The advantage of the second method is that when WPML is updated with a permanent fix you will not have to worry about removing any functions from your theme.

July 22, 2013 at 1:26 pm #147351

Rachel

Thanks for this post. I would like to do set up # 2.

Can you tell where exactly enter it? Also i don't have the sitepress.class.php in my editor section.
Does it have another name? Please help thanks

July 23, 2013 at 6:41 am #147636

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

Rachel,

You will find the file in sitepress-multilingual-cms/sitepress.class.php.
Look for the get_ls_languages() function and scroll to the end. You will see

return $w_active_languages;

Right before, i.e. in the line above enter:

wp_reset_query();

If this is not clear enough let me know. Thank you.

July 23, 2013 at 11:47 am #147828

Rachel

Sarah maybe you can help me. I have been trying to get my site fixed. by one the other support wpml. But I think there is some clarifications issues between us via email and the massive time difference. I have a website which faimprojects.com and i also have french site fr.faimprojects.com.

1. problem
fr.faimprojects.com (french translation) page is linked to the faimprojects.com (it shows on the permalink)
although its says Accueil. I need it to be individual pages so I can change the content to french.
For some odd reason I CAN'T FIND THE PAGE FOR fr.faimprojects.com

2. hidden link read more button is in english) please advise.

July 23, 2013 at 3:48 pm #147937

Elena

Hi Sarah.n
I have the same problem as described above - duplicate content. My problem is - I am so new to wordpress that I do not even know where to find and edit
sitepress-multilingual-cms/sitepress.class.php. Can you look at my site and fix it? or give me precise instruction where to go (or screenshot). Thanks in advance

July 23, 2013 at 3:50 pm #147938

Arnaud

Hi,
I would like to use the second solution but I don't find the function get_ls_languages() in sitepress-multilingual-cms/sitepress.class.php.

Can you tell me wich line is it ?
Thank you

July 23, 2013 at 3:52 pm #147941

Paul

Hi Guys,

If I may, I'd like to jump into this thread because my issue is directly relevant. I'm trying to do fix number 2 for Wootheme 'Resort' (WPML compatible) and Woocommerce. I can find the sitepress.class.php file and get_ls_languages() function command (in line 5429 of the attached image file).

However, I cannot find return $w_active_languages; anywhere in the file.

Where exactly (ie which line) should I be placing the wp_reset_query(); fix, please?

Cheers,
Paul

July 24, 2013 at 5:18 am #148032

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

@rachel, why don't you open a new thread on the subject? This way I will be able to assist you further without destructing from the point of this thread. Thank you!

@elena, Arnaud and Paul. I have emailed you a copy of WPML that contains the fix.

To use:
1. Deactivate the existing WPMl plugin

2. Manually delete the plugin files from the plugin folder (you are not deleting the database content with this action just the plugin files)

3. Unzip and upload the WPML copy I've emailed you to the plugin directory.

4. Activate WPML.

July 24, 2013 at 5:24 am #148033

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

@paul, The email I sent to your email address (what I see attached to your wpml.org user account) paul[dot]jenkins[at]mac.com just returned back to me.

If you are interested in receiving a copy with the fix please email me at sarah.n[at]icanlocalize[dot]com with the topic of this thread as the subject line.

Thank you.

July 24, 2013 at 7:18 am #148071

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

Version 2.9.1 has just been released: http://wpml.org/2013/07/wpml-2-9-1-bugfix-release/

August 1, 2013 at 7:08 pm #151109

Emiliano

Hi,
I'm sorry, but just today I updated the WPML to 2.9.1 version and I begin having the same problem about the duplicated content.
This is the page where you can see it:
hidden link
This updating to 2.9.1 give me the problem...
If I must say the true I didn't give great attention about the last version I had before, but I remember it was the 2.9.0. The problem is that looking at this discussion, now I'm not so sure about it as a lot of people had the same problem with the 2.9.0 too.... 🙂
However what it's sure, this new version haven't solved the problem completely as I have it now.
Please, could you help me in some way?
Thanks in advance
Emiliano

August 1, 2013 at 8:15 pm #151134

Emiliano

Just to give some more details about my problem...
I made some tests and now I'm sure that with the 2.9.0 I had no problems, but they've gone out with the 2.9.1...
In fact I made the opposite of what "sarah.n" suggested to solve the problem in 2.9.0, and I solve my problem in 2.9.1.

I mean, if I delete, in the sitepress.class.php, the following
wp_reset_query();

the problem of double contents disappear. For this reason with the 2.9.0 I haven't the problem of other people, but now I have it in my site.... 🙁

I can use this way till the next release, but I'd like you can assure me that in the next one you will solve it..
Thanks in advance again

August 3, 2013 at 5:04 am #151505

Amir
Supporter

Can you please start a new support thread about this? This thread is marked as 'resolved', so our staff will skip it.

Version 2.9 had a bug which caused an interaction with some theme, related to restarting the wp_query. We suggested a workaround for it, which is described at the top of this thread:
http://wpml.org/forums/topic/content-appears-double-on-my-sites-front-end-after-2-9-update/#post-146514

Then, we added that to WPML itself. So, if you were running that patch, you should have upgraded to WPML and removed that patch from your theme. Having it done twice will likely cause issues.

If you modified your theme, you should revert that modification and upgrade WPML together. If this is still happening, please start a new thread, describe what theme you are using and what you are seeing. Our supporters will likely need access to your site to see it.

It's Saturday morning today and the developers will only be back to work on Monday. I suggest doing this experiment on Monday, when we have staff that can help you. Anyway, if problems continue, you should create a new thread, so that it received attention.