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.

Our next available supporter will start replying to tickets in about 0.68 hours from now. Thank you for your understanding.

This topic contains 7 replies, has 2 voices.

Last updated by Riffaz 1 year ago.

Assigned support staff: Riffaz.

Author Posts
October 5, 2018 at 4:02 am #2789531

Antonis

I am trying to: Enable the language switcher

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

I expected to see: products page

Instead, I got:

Warning: strpos() expects parameter 1 to be string, object given in /var/www/DOMAINS/demo_net_gr/www_demo_net_gr/website/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/strategy/class-wpml-url-converter-subdir-strategy.php on line 185

Warning: strpos() expects parameter 1 to be string, object given in /var/www/DOMAINS/demo_net_gr/www_demo_net_gr/website/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/strategy/class-wpml-url-converter-subdir-strategy.php on line 187

Warning: strpos() expects parameter 1 to be string, object given in /var/www/DOMAINS/demo_net_gr/www_demo_net_gr/website/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/strategy/class-wpml-url-converter-subdir-strategy.php on line 187

Warning: strpos() expects parameter 1 to be string, object given in /var/www/DOMAINS/demo_net_gr/www_demo_net_gr/website/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/strategy/class-wpml-url-converter-subdir-strategy.php on line 82

Catchable fatal error: Object of class WP_Error could not be converted to string in /var/www/DOMAINS/demo_net_gr/www_demo_net_gr/website/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php on line 471

October 5, 2018 at 10:03 am #2790290

Riffaz
Supporter

Languages: English (English )

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

Hi,

I do not see any errors on the page you've mentioned in the ticket: hidden link
has this been solved?

Please confirm.

Regards,
Riffaz.

October 5, 2018 at 10:59 am #2790467

Antonis

Because the site is Live I have disabled the Language Switcher. Would you like me to enabled for a while?

October 5, 2018 at 11:06 am #2790490

Riffaz
Supporter

Languages: English (English )

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

Hi,

Ok, that would be helpful if you can enable it for 10 minutes at least to check the closely.

Regards,

October 5, 2018 at 11:38 am #2790574

Antonis

I just did... the error is in hidden link
I also enabled WP_DEBUG

Thanks is advance

October 5, 2018 at 11:51 am #2790625

Riffaz
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support.

Have you translated the categories having issues to secondary language?

Please try the following steps after a site backup and make sure the bug is existing or not.

1) Go to WPML>>Support page
2) Click on Troubleshooting link (blue link in the middle of the page)
3) In Troubleshooting page, please click on the following options of *Clean up* section. Wait for confirmation of processing after each one.

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment

Let me know.

Regards,

October 5, 2018 at 12:06 pm #2790659

Antonis

OK I will,

Thanks for the advice!

October 8, 2018 at 4:21 am #2794745

Riffaz
Supporter

Languages: English (English )

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

You are welcome.

Let me know if you need anything else regarding this.

Regards,

The topic ‘[Closed] Fatal error after enabling the language switcher’ is closed to new replies.