Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
A custom language with a problematic image was deleted and then the site crashed.

Solution:

The only way to solve the problem was to delete *all* the entries in wp_icl_ tables of database as well as in wp_options table for the custom language recently deleted.

Relevant Documentation:
None

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 3 voices.

Last updated by Yvette 1 year, 6 months ago.

Assisted by: Yvette.

Author Posts
October 4, 2022 at 8:35 am #12175635

Vadim Khomakha

I have added 2 custom languages (tajik and Kyrgyz) and one from the supported list (Uzbek)

Adding a Tajл language falls to errror:

2022-10-04 11:09:13.672829 [NOTICE] [57593] [78.57.54.205:36272:HTTP2-369#salam.dau.org.ua] [STDERR] PHP Fatal error: Uncaught InvalidArgumentException: item should be a Collection or an array or an object in /var/www/salam.dau.org.ua/html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php:112
Stack trace:
#0 [internal function]: WPML\FP\Obj::WPML\FP\{closure}()
#1 /var/www/salam.dau.org.ua/html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(152): call_user_func_array()
#2 [internal function]: WPML\FP\Obj::WPML\FP\{closure}()
#3 /var/www/salam.dau.org.ua/html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array()
#4 /var/www/salam.dau.org.ua/html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php(90): WPML\FP\Obj::__callStatic()
#5 [internal function]: WPML\FP\Obj::WPML\FP\{closure}()
#6 /var/www/salam.dau.org.ua/html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(152): call_user_func_array()
#7 [internal function]: WPML\FP\Obj::WPML in /var/www/salam.dau.org.ua/html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php on line 112

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

While trying to press "plus" sign to add a translation site crashes.

I have deacrtivate all the plugings and set theme to default, but editing of any translation still doesn't work.

All other features work as usual, menu switches languages too.

October 4, 2022 at 9:15 am #12175843

Vadim Khomakha

I have deleted *all* the strings related to "tg" by hand. And functionality restored.
But the question is: WHY this happens?

October 4, 2022 at 11:50 am #12176761

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

While one of my teammates takes care of your ticket, I will provide you with the first debugging steps.

I cannot say for sure why this happens as it might depend on different factors. I noticed that you have disabled Rest API, and WPML relies on the WordPress REST API for some of its features. Could you enable it and test it afterward?

https://wpml.org/documentation/support/rest-api-dependencies/

If you still have this issue and can replicate it, one of our teammates will check this further.

October 4, 2022 at 3:50 pm #12179221

Vadim Khomakha

Hello,
I have enabled it before opening the ticket with the same result.
As a next step I have tried to delete a custom language, but a "tail" appears as a result - there was an 'hanging' media file, which cannot be deleted (an it didn't appeared in media library and in wp-content directory).

The only way to solve the problem was to delete *all* the entries in wp_icl_ tables of database as well as in wp_options table for the custom language recently deleted.

You coulld reproduce the issue if you'll create a new language and delete it then.

Regards.
Vadym

October 4, 2022 at 10:44 pm #12181119

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Hello

Do I understand that you have resolved your issue yourself?

Right now, can you tell me what you would like us to do? Do you want us to replicate the issue to investigate why this happened?

Thanks for the clarification. I can provide a sandbox site where we can work.

October 5, 2022 at 5:16 am #12182369

Vadim Khomakha

Hello,
Yes, I have resolved the issue.
Try to reproduce it by:
1. Create custom language with erroneous code, a flag (svg)
2. Translate one article with image
3. Delete the language because of code is not valid
4. Maybe you could see a "tail"image which cannot be deleted (page updated, but still displayed after refreshing). Moreover the image doesn't exist.
5. (Try to apply all available options on diagnostic page)
6. Image cannot be deleted anyway.
That's all
After that I have edited the database and deleted *all* the entries with erroneous code by hand. Issus have gone.

Regards,
Vadym

October 10, 2022 at 11:49 pm #12216253

Yvette
Supporter

Languages: English (English ) Spanish (Español )

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

Thank you.

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