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.

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

This topic contains 11 replies, has 2 voices.

Last updated by zakW 1 year ago.

Assisted by: Christopher Amirian.

Author Posts
April 28, 2023 at 12:08 pm #13557307

zakW

This has happened twice now and we have done all that we can to try and fix it.

The situation is that sometimes the main site forgets that WPML is set up. When this happens our sub-sites break with a critical error as they use the main site menu. When WPML does not detect a language set for the menu it crashes the site.

So to resume:
- bakerperkins.com is a multisite
- The footer uses menus that come from site ID 1
- At random the site will experience a critical error, all the other sites apart from ID 1 will break at the footer menu

- We get this error message:
Fatal error: Uncaught Error: Object of class WP_Post could not be converted to string in /home/948939.cloudwaysapps.com/pkftxwadfp/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php:225 Stack trace: #0 /home/948939.cloudwaysapps.com/pkftxwadfp/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php(225): array_diff() #1 /home/948939.cloudwaysapps.com/pkftxwadfp/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-query-parser.php(543): WPML_Element_Translation->prefetch_ids() #2 /home/948939.cloudwaysapps.com/pkftxwadfp/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-query-parser.php(436): WPML_Query_Parser->adjust_q_var_pids() #3 /home/948939.cloudwaysapps.com/pkftxwadfp/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(3411): WPML_Query_Parser->parse_query() #4 /home/94893 in /home/948939.cloudwaysapps.com/pkftxwadfp/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 225

- What we think has happened is Site ID 1 is not set up with WPML
- When we try to finish the WPML setup (screenshot 1) it says we are now allowed access (screenshot 2)
- We tried different admin accounts and we tried creating a new admin account, the same message shows
- Later though the WPML is set up for ID 1 and the problem goes away, then it reoccurs a week later

screenshot 1.jpg
screenshot 2.jpg
May 2, 2023 at 7:11 am #13567325

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Let me first understand what is the issue. Tell me if my assumption is correct?

- You did not install WPML as a network plugin.
- You installed WPML on a sub-site (ID-1)
- You somehow bring the information of the sub-site to all the footers of the other websites.
- WPML breaks periodically.

If that is the use case, please avoid installing WPML on a sub-site and install it as a network plugin:

https://wpml.org/documentation/support/multisite-support/

Then you can setup WPML for each sub-site to decide which language pairs to use.

If I did not understand the issue correctly, please get back to us with more details on the steps and how the setup is.

Thank you.

May 2, 2023 at 11:03 am #13569925

zakW

Hi Christopher Amirian, thank you for your reply.

No, WPML is installed as a network plugin, and was set up on each individual site.

But for some reason on site ID 1, it continually gets stuck in setup mode. Sometimes, after trying to prompt it, we return and see WPML is setup for site ID 1 and we can access the settings page. Then later it goes back to being in set up mode.

We would be happy to provide a login if you want to take a look yourself.

May 2, 2023 at 1:30 pm #13571001

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

I also need to know if there is some sort of load balancing, caching or anything that you might think is happening on the server level? That can effect this?

May 3, 2023 at 1:23 pm #13579095

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you, I checked the website and for now, everything works ok.

I suggest when you encounter such an issue please clear Varnish and Redis cache and see if it fixes the issue.

Maybe something on the setup of the system causes the issue but I can not be sure as I do not see the issue happening now.

What I suggest which I know will be a huge workload but I think will be a good place to work on is to copy the whole Multisite system you have to a staging version.

So you will have a duplicate of the same setup. but this time, do not apply any sort of cache.

See if the same thing happens periodically on the copied website or not.

Thanks.

May 4, 2023 at 8:58 am #13584159

zakW

Hi Christopher Amirian, Thank you for your reply.

I did try again to finish the setup and still having the same problem. I log in with the account that I provided you and we got the same permission problem meaning we still have problems with this. link to a screen record here -> hidden link

I created the staging website and disable the cache. we will report our findings tomorrow regarding that.

Thanks

May 4, 2023 at 12:36 pm #13586487

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you. Waiting for the staging website result. But I could not watch the video as it says it does not find the video.

Thanks.

May 4, 2023 at 2:09 pm #13587151

zakW

Hi Christopher Amirian,

As soon as I know something from the staging website will let you know.
You can check the video now. Problem with the privacy settings.

Thanks

May 5, 2023 at 7:40 am #13591335

zakW

Hi Christopher Amirian,

Today the 5th of May the website is still behaving like normal with all the settings still working. But yesterday it wasn't as we reported before. The system did repair itself and this is the expected behaviour. We want to wait until Monday and Tuesday and check it again and see what is happening. The staging website is normal as well.

Is there anything else you can think of that might be causing this?

Thanks

May 7, 2023 at 11:58 am #13600425

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you for the information. I managed to check the video you shared.

Nothing that I can think of at the moment. It seems to be related to the live environment.

But I do not have enough information to draw a conclusion.

Let's wait and see if the staging website has any sort of issues during that time or not.

If not, then you need to check with the hosting ser vice provider and see what are the differences server wise and cache wise.

Maybe object cache, transient cache, redis cache, ...

Thanks.

May 11, 2023 at 7:32 am #13627673

zakW

Hi Christopher Amirian,

A couple of days have passed and all is working as it should. We didn't make any changes and there isn't anything we can do at this moment, so we are closing the ticket. If this happens again in the future we will contact you and we always have the staging website to monitor

Thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.