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.

Tagged: 

This topic contains 10 replies, has 2 voices.

Last updated by Bigul 1 year, 6 months ago.

Assisted by: Bigul.

Author Posts
October 27, 2023 at 1:05 pm

johnM-108

When enabling WPML and translating a page, the page template is completely broken and many JS errors are thrown. Can you review the page and assist with a solution?

October 27, 2023 at 3:03 pm
October 30, 2023 at 1:10 pm #14691743

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

We are still working on this. The Duplicator Pro is taking more than expected time to create the package because of the server settings. Also failed multiple times. Refer to the attached image for more details. We will get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

2023-10-30_18h37_58.png
October 31, 2023 at 1:32 pm #14700169

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Please check the attached image. We are not able to reproduce the issue exactly in my local copy. So consulting with our team for the expert opinion. We will get back to you as early as possible. Please wait.

--
Thanks!

Bigul

2023-10-31_18h44_56.png
October 31, 2023 at 2:29 pm #14700899

johnM-108

Thank you for testing this, and we're looking forward to more information from your team. What might be the differences between your local environment and our WPEngine environment that could cause this?

October 31, 2023 at 3:18 pm #14701599

johnM-108

Bigul,

I've discovered where the error is occurring. In the child site (hidden link) I'm pulling the "Primary Menu" from the main site (hidden link) using the code in the attached image.

This code is in the following file:
/wp-content/themes/marshberry/templates/global-navigation.php (Lines 14-23)

This scenario is working fine for the live site (hidden link) where WPML is NOT currently being used.

In the staging environment, where we are experiencing the problem, WPML is activated for the child site but NOT active on the main site. Does this sound like something that might cause an error like this?

Screen Shot 2023-10-31 at 10.58.08 AM.png
October 31, 2023 at 3:31 pm #14701861

johnM-108

Bigul,

The error reads: "Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /nas/content/live/marshberrystg/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:80"

When I view the Appearance > Menus screen on the child site (where WPML is active and configured) there's a new drop-down "Language".

But on the main site, where WPML is NOT active, that drop-down is naturally not there.

Could this be the source of the issue?

We hadn't planned on activating WPML on the main site, because it's only going to have the English language for now. So we don't want to activate/configure it until we know for sure that this is the issue.

Screen Shot 2023-10-31 at 11.31.29 AM.png
Screen Shot 2023-10-31 at 11.31.20 AM.png
October 31, 2023 at 4:15 pm #14702177

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the details. It will help us in debugging. But the strange thing is that it worked on my local server without any changes. Are you getting any other warnings or errors related to WPML in the Debug.log file?

--
Thanks!

Bigul

November 3, 2023 at 9:44 am #14724141

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

We are still working on this issue and doing some tests on the staging site now. Please wait. We will get back to you as soon as possible.

--
Thanks!

Bigul

November 9, 2023 at 12:45 pm #14766993

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

The ticket is escalated to our second-tier team for further debugging. However, we are not able to login to the site because of the following error. Please check.

Error: The username **** is not registered on this site. If you are unsure of your username, try your email address instead.

It will be great if you can share the FTP access also.

--
Thanks!

Bigul

November 10, 2023 at 2:27 pm #14777617

johnM-108

Bigul -- I'm not sure how this has evolved, but we've got this working on our site. So, I'm going to close this ticket and will start a new one if the issue arises again.

November 10, 2023 at 2:36 pm #14777933

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the feedback. Happy to know you are getting the expected results now. It may be a compatibility issue with server settings. We are also not able to reproduce the issue on our local copies.

--
Thanks!

Bigul