Skip Navigation

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

Last updated by Riffaz 3 weeks, 6 days ago.

Assigned support staff: Riffaz.

Author Posts
July 4, 2020 at 6:39 pm #6521319

samer kattouf

Hello

My site kept timing out and such when i was working on it and contacted web host to check why server is too bussy.

I was told the following:

========================================================

According to the error_log file the problem can be related to sitepress-multilingual-cms plugin you installed, please refer to the following logs:

###
[04-Jul-2020 02:02:38 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
[04-Jul-2020 02:02:39 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
[04-Jul-2020 02:18:04 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
###

I advise you to re-install this plugin using wordpress admin dashboard.
========================================================

From your plugins i am ONLY using WPML Multilingual CMS 4.3.16

I had 4.3.15 and now updated to 4.3.16

I want to ask before i do anything.

July 5, 2020 at 2:42 am #6522117

Riffaz
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support.

Please follow the steps that solved the same issue here: https://wpml.org/forums/topic/what-does-this-error-mean-object-of-class-wp_error-could-not-be-converted-to-s/#post-1021152
Let me know the results after performing those steps please.

Regards,
Riffaz.

July 11, 2020 at 2:35 am #6572329

samer kattouf

I have now backed up the database and then i ran them 1 by one. I will contact webhost to see if they see that errors again.

Another question:

I use YOAST, do i need to install the yoast plugin you offer?

July 11, 2020 at 3:38 pm #6574925

samer kattouf

I heard back from the webhost.

=========================================================
Yes, the error still exists:
[04-Jul-2020 23:28:47 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
[10-Jul-2020 01:40:17 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
[10-Jul-2020 02:58:02 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
[10-Jul-2020 03:19:31 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
[10-Jul-2020 03:23:57 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
[10-Jul-2020 08:45:19 UTC] PHP Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xxxxx/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 62
=========================================================

I used xxxx to hide name

What would be causing this fatal error?
I went though trouble shooting and did all except the last one "reset" I have english language, swedish and some pages in spanish and german.

July 12, 2020 at 8:02 am #6576903

Riffaz
Supporter

Languages: English (English )

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

Hi,

Thank you for the details.

I use YOAST, do i need to install the yoast plugin you offer?
- no need actually
- YOAST SEO Multilinugual core is included in the main WPML plugin
- you will need this for some extra features
- doc: https://wpml.org/documentation/related-projects/using-wordpress-seo-with-wpml/

Did you translate all your categories / taxonomies correctly and assign to the correct posts?
if yes and if you still see the issue, please create a temporary admin user.
Let me know the username and password in the next private reply.

Regards,

July 13, 2020 at 1:44 am #6578439

samer kattouf

The way i have it set up is:

1- I translate the english text to say spanish
2- In the yoast plugin section under post i give it a spanish title, keyword, description.
3- Category I have kept the english ones.

"Did you translate all your categories / taxonomies correctly and assign to the correct posts?" I have not done anything other than the above steps.

If i translate a post and add new spanish tags and remove the english tags why would that be a problem?

July 13, 2020 at 10:23 am #6582231

Riffaz
Supporter

Languages: English (English )

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

Hi,

The error message you are seeing from line 62 which has some filters: wpml_head_langs and wpml_alternate_hreflang (attached screenshot)
if any of those is used incorrectly it could be causing this error.

So first step we have to make sure is that it does not come from your site.
To do this, please switch your theme to a default theme like twenty twenty and check the issue.
If you still see the issue please install WPML SEO Multilingual latest version and check.

And, if you still see the same issue let us know. we will have to check your site in our test servers.

Regards,

The topic ‘[Closed] error logs’ is closed to new replies.