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.

Tagged: 

This topic contains 10 replies, has 2 voices.

Last updated by Itamar 1 year ago.

Assigned support staff: Itamar.

Author Posts
August 28, 2018 at 2:10 pm

uweS-2

I am trying to: load tag

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

I expected to see: listing of tagged articles

Instead, I got: empty page

With DEBUG enabled I got the errors:

Warning: Illegal offset type in isset or empty in /home/www/ic-gruppe.com/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php on line 44

Warning: Illegal offset type in isset or empty in /home/www/ic-gruppe.com/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/helper/class-wpml-url-converter-lang-param-helper.php on line 30

Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/www/ic-gruppe.com/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php on line 471

August 28, 2018 at 3:13 pm #2683219

uweS-2

Addition: Up to WPML 3.9.4 everything has worked perfectly.

August 28, 2018 at 9:50 pm #2684226

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Thank you for contacting the WPML support forum.

I can see the issue on your site.
In our internal documentation, I can a recently reported issue that is close to this issue.
Please let me ask you the following.
1. Have you changed the default language recently?
2. Can you please try to re-save the permalinks in Settings -> Permalinks and check if the issue persists?

I look forward to your reply!

Regards,
Itamar.

August 29, 2018 at 9:05 am #2685617

uweS-2

Hello Itamar,

regarding your questions:

1. I have indeed changed the default language once, but not recently (about 2 years ago).
2. Re-saving permalinks did nothing.

August 29, 2018 at 8:53 pm #2687872

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for trying my suggestions.

According to the issue that I can see on our internal documentation I would like to ask you to perform the following check, please.
A. Go to WPML -> Languages and temporarily remove all the Language Switcher switchers that you have enabled on the site.
B. Scroll down to 'SEO Options' and uncheck the 'Display alternative languages in the HEAD section.' option and save.
Please see the attached screenshot.

Does the problem persist, now?

Thanks,
Itamar.

August 30, 2018 at 10:38 am #2689556

uweS-2

When I deactivate the switcher AND the SEO options, it works!
(When only changing one of the two, the error persists.)

But this is still no solution, because we need the Switcher of course ...

August 30, 2018 at 11:00 pm #2692000

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thank you for confirming this.

I'm adding now your ticket to our internal ticket about this issue.
I've also attached the duplicator package that you have attached to this ticket.
Our second tier supporter will debug this issue, and we will keep you update about it here.

Regards,
Itamar.

September 4, 2018 at 6:00 pm #2704323

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi there.

Our 2nd Tier support found the cause of the issue and escalated it to our developers.

In the meantime, you can use this workaround to fix it:
❌ Before proceeding please make a full website backup! ❌

- Open the \wp-content\plugins\sitepress-multilingual-cms\classes\url-handling\resolver\class-wpml-resolve-object-url-helper.php file
- Go to line 80
- Change that line from:

$term = get_term( $translations[ $lang_code ]->element_id, $subtype );

To:

$term = get_term_by('term_taxonomy_id', $translations[ $lang_code ]->element_id, $subtype );

Please let me know if this solves the issue or if you need further details.

Thank you

September 5, 2018 at 11:17 am #2706624

uweS-2

At first glance, it looks like it's working. I'm going to test it extensively now.

Thank you!

September 6, 2018 at 12:17 pm #2710616

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Great.

Please let me know if there are issues.

Regards,
Itamar.

September 24, 2018 at 12:05 pm #2760346

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, there.

Please let me know if the fix is still working alright.
This issue is already fixed in WPML version 4.0.7.

Regards,
Itamar.