Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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 thread is resolved. Here is a description of the problem and solution.

Problem:
After updating WPML to 3.6.1 I am seeing errors on my profile page

Solution:
Here is a workaround that should resolve the issue until we can contact Yoast for a permanent solution which will be included in a future update:

Go to /sitepress-multilingual-cms/classes/compatibility/wpseo/class-wpml-wpseo-filters.phpand on line 69 change:

if ( $obj instanceof WP_Post) {

to:

if ( $obj instanceof WP_Post && $obj->ID != 0) {

This topic contains 12 replies, has 2 voices.

Last updated by Olivier 3 years, 2 months ago.

Assigned support staff: Lauren.

Author Posts
November 30, 2016 at 7:31 pm #1148092

Olivier

after last WPML update the site is broken
All budypress section are empty, all static pages are ok

(the last update was only regarding WPML and SEO plugin)

All works fine if WPML is deactivated.

error in logs:

[proxy_fcgi:error] [pid 22558:tid 139653747308288] [client 193.246                         .63.8:65070] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught InvalidArgumentException: A                         rgument ID must be numeric and greater than 0. in /srv/vhosts/linkedbyroad/htdocs/wp-content/plugins                         /sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28\nStack trace:                         \n#0 /srv/vhosts/linkedbyroad/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/canonical                         s/class-wpml-canonicals.php(78): WPML_Translation_Element->__construct(0, Object(SitePress))\n#1 /sr                         v/vhosts/linkedbyroad/htdocs/wp-content/plugins/sitepress-multilingual-cms/classes/compatibility/wps                         eo/class-wpml-wpseo-filters.php(71): WPML_Canonicals->get_canonical_url(false, Object(WP_Post))\n#2                          /srv/vhosts/linkedbyroad/htdocs/wp-includes/plugin.php(235): WPML_WPSEO_Filters->canonical_filter(fa                         lse)\n#3 /srv/vhosts/linkedbyroad/htdocs/wp-content/plugins/wordpress-seo/frontend/class-frontend.ph                         p(1001): apply_filters('wpseo_canonical', false)\n#4 /srv/vhosts/linkedbyroad/htdocs/wp-content/plug                         ins/wordpress-seo/frontend/class-frontend.php(852): WPSEO_F...\n', referer: <em><u>hidden link</u></em>.                         com/

We try to replace WPML 2.6.0 by 2.6.1 (remove and replace by FTP) but no change

Waiting your answer

Best regards
O Bourgeois

November 30, 2016 at 10:19 pm #1148252

Lauren
Supporter

Languages: English (English )

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

Thank you for contacting WPML support. I'll be happy to help you with this.

This may be related to an issue that our developers have been working on.

In version 3.6, in wp-content/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-render.php on line 127
please change from:

public function wp_nav_menu_objects_filter( $items, $args ) {
    $menu_id = isset( $args->menu->term_id ) ? $args->menu->term_id : null;

to:

public function wp_nav_menu_objects_filter( $items, $args ) {
    $args    = (object) $args; // <= Add this line
    $menu_id = isset( $args->menu->term_id ) ? $args->menu->term_id 

Can you please let me know if this resolves the issue?

December 1, 2016 at 8:19 am #1148467

Olivier

Hi
I think you do not read carefully my post:
"We try to replace WPML 2.6.0 by 2.6.1 (remove and replace by FTP) but no change"

This additional line was include in your 2.6.1 and this does NOT solve the problem

Olivier

December 1, 2016 at 7:00 pm #1149275

Olivier

Hi
I roll back to Version 3.5.3.1 and deactivate string translation and translation management and the site is up again but please find urgently a solution because we can not stay like this ....
Regards
OB

December 1, 2016 at 7:06 pm #1149278

Lauren
Supporter

Languages: English (English )

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

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.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**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

December 1, 2016 at 7:10 pm #1149286

Lauren
Supporter

Languages: English (English )

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

One other note: I have found some similar issues where this error appeared with a corrupted install of WPML. Could you please try downloading a fresh copy of the main WPML core plugin from http://www.wpml.org/account/downloads? Then, deactivate your current WPML plugins. Delete the plugins - this will not delete your translations, those are all stored in the database. Then, install the fresh download of WPML core. Activate this and see if the error displays again. if not, please go to Plugins -> Add New and click the commercial tab. Then install and activate each plugin add-on that you need one at a time and let me know if you see the error appear again after any of the activations.

December 1, 2016 at 9:40 pm #1149393

Lauren
Supporter

Languages: English (English )

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

I understand that you had previously uploaded the new WPMl via FTP, however, there could have been a corruption in the original download, which is why I requested you to download a fresh version and test that.

Thanks for sending the credentials. I was able to login, however, it looks like I am not enabled as an administrator so I don't have access to anything other than my profile. Please allow me admin access so that I can install the Duplicator plugin. This will allow me to create a snapshot of your site that I can install locally so that I can conduct testing without touching your live site. If you can't allow me admin access, feel free to install the duplicator plugin and send me the archive and installer files. Once the snapshot is complete, either upload the snapshot ZIP file and the installer.php file to a file sharing service such as Dropbox (and share the link in your reply) or right click the Duplicator links in your wp-admin and paste in your reply.

Please note: It is important to reduce the size of the package so please exclude some paths like /cache or /uploads and also exclude archives and media files.

I will enable the next reply to be private so only you and I have access to it!

December 2, 2016 at 7:52 am #1149589

Olivier

Sorry my mistake, you are now admin
Duplicator is installed and you can find 2 snapshot.
The oldest one is with the 3.6.1 version of WPML (but deactivated)
the newest on after i roll back to 3.5.3.1

And YES i remove all the files of 3.6.0 and upload a fresh full version of 3.6.1 directly from your download page

Best regards
OB

December 2, 2016 at 11:21 pm #1150519

Lauren
Supporter

Languages: English (English )

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

Thanks so much for switching my access. I was able to install the duplicator file and create a snapshot of your site locally. The changes I mention below were made only to my local copy of the site, NOT on your live site.

I updated WPML to 3.6.1 and when activated String Translation. That's when I saw a blank white screen on the backend. So, I added this to your wp-config.php file to increase WP Memory:

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

By the way, I also added this so that I could see the error message on the frontend:

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

When I increased the memory, the site did not load but I saw this error:
Fatal error: Uncaught Error: Class 'PMProRH_Field' not found in /Users/laurenjeffcoat/Desktop/test_sites/olivier/wp-content/themes/woffice-child-theme/functions.php:24 Stack trace: #0 /Users/laurenjeffcoat/Desktop/test_sites/olivier/wp-settings.php(385): include() #1 /Users/laurenjeffcoat/Desktop/test_sites/olivier/wp-config.php(110): require_once('/Users/laurenje...') #2 /Users/laurenjeffcoat/Desktop/test_sites/olivier/wp-load.php(39): require_once('/Users/laurenje...') #3 /Users/laurenjeffcoat/Desktop/test_sites/olivier/wp-admin/admin.php(31): require_once('/Users/laurenje...') #4 /Users/laurenjeffcoat/Desktop/test_sites/olivier/wp-admin/plugins.php(10): require_once('/Users/laurenje...') #5 {main} thrown in /Users/laurenjeffcoat/Desktop/test_sites/olivier/wp-content/themes/woffice-child-theme/functions.php on line 24

So I then renamed the woffice-child theme which deactivated it and the site came back up. With the default theme, I was able to activate WPML 3.6.1, String Translation, and Translation Management without any errors. I was also able to activate the parent theme woffice without seeing the error, by the way. So, it seems there is an issue with the child theme.

Can you please test this on your live site and let me know if you get the same results?

December 8, 2016 at 1:29 pm #1155007

Olivier

Sorry for the delay but we installed a "dev" version of the site to be more easy for debuging
(same information's and URL except "dev" instead of "www")

I have not your results:
if i change the theme, the error is the same !
i try with different theme and same result ...
It is not a theme issue

but i just discover that if i deactivated the "Yoast SEO" plugin it works!

For me it is clearly a problem of compatibility between WPML and Yoast SEO that impact the buddypress ...

Waiting your information's
Best regards
Olivier

December 8, 2016 at 3:48 pm #1155174

Lauren
Supporter

Languages: English (English )

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

Thanks so much for setting up the dev site, this will be a great help.

I created a duplicator package of your dev site and set it up locally. When I activate Yoast on my local version of your development, I still am not seeing an error. Did you see the error as soon as the Yoast plugin was activated? Or did you try to load a certain page of your site?

The reason I didn't test this on the dev site is because I don't currently have FTP access to it and wouldn't be able to deactivate Yoast once I am seeing the error. Could you please allow me FTP access to the development site? This will allow me to see the error so I can troubleshoot further. Thanks so much for all of your cooperation.

December 8, 2016 at 4:34 pm #1155227

Lauren
Supporter

Languages: English (English )

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

After digging around some more and speaking to one of our developers, I believe I found the issue. In my test site, when I tried to access my profile page, I was able to see the error (with WPML and Yoast activated).

Here is a workaround that should resolve the issue until we can contact Yoast for a permanent solution which will be included in a future update:

Go to /sitepress-multilingual-cms/classes/compatibility/wpseo/class-wpml-wpseo-filters.phpand on line 69 change:

 if ( $obj instanceof WP_Post) {

to:

if ( $obj instanceof WP_Post && $obj->ID != 0) {

This resolved the error in my test site. Please let me know if it resolves on your live site, also.

December 11, 2016 at 8:43 pm #1157041

Olivier

Hi Lauren
it works !
Thank you very much and i will be very interested to be informed when this problem will be solved (by WPML or Yoast SEO)
Best regards
Olivier