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 12 replies, has 2 voices.

Last updated by Bobby 1 year, 5 months ago.

Assisted by: Bobby.

Author Posts
May 11, 2023 at 10:24 am #13629065

georgeC-7

I am trying to: renew the product variations, but it tries to load them until it throws the 500 server error

Link to a page where the issue can be seen: is in the admin section

I have temporarily deactivated the Mulitlingual & multicurrency plugin, because I was notified from wp with an email that it caused an issue.

May 11, 2023 at 11:58 pm #13633563

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

I would need to see the detail of the error. You can see how to enable debug logging here:
https://wpml.org/documentation/support/debugging-wpml/

Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);

Edit your wp-config.php file and add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . 'https://cdn.wpml.org/error_log.txt');

This will create an error_log.txt file in your site's root directory. Please send me its contents.

NOTE: If you are just activating the error logging you might need to trigger the fatal error again in order for it to catch the error.

May 12, 2023 at 7:17 am #13634501

georgeC-7

Hello,

See the fatal error below. Also, the variations don't appear in the admin in the main language, in the majority of variable products. See the attached image.

Error log

[12-May-2023 07:07:27 UTC] PHP Fatal error: require(): Failed opening required '/home/stema/public_html/wp-content/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-attributes-controller.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/stema/public_html/wp-content/plugins/woocommerce/vendor/jetpack-autoloader/class-php-autoloader.php on line 87
[12-May-2023 07:09:53 UTC] PHP Fatal error: Uncaught Error: Class 'WPML_TM_REST_ATE_Jobs' not found in /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/REST/class-wpml-tm-rest-ate-jobs-factory.php:9
Stack trace:
#0 /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/action-filter-loader/class-wpml-action-filter-loader.php(144): WPML_TM_REST_ATE_Jobs_Factory->create()
#1 /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/action-filter-loader/class-wpml-action-filter-loader.php(121): WPML_Action_Filter_Loader->run_factory(Object(WPML_TM_REST_ATE_Jobs_Factory))
#2 /home/stema/public_html/wp-includes/class-wp-hook.php(308): WPML_Action_Filter_Loader->deferred_loader(Object(WP_REST_Server))
#3 /home/stema/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#4 /home/stema/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /home/stema/public_html/wp-includes/rest-api.php(577): do_action('rest_api_init', Object(WP_REST_Server in /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/REST/class-wpml-tm-rest-ate-jobs-factory.php on line 9

[12-May-2023 07:13:17 UTC] PHP Warning: include(): Failed opening '/home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/../../classes/jobs/query/Query.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/ClassLoader.php on line 571
[12-May-2023 07:13:17 UTC] PHP Fatal error: Uncaught Error: Interface 'WPML\TM\Jobs\Query\Query' not found in /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/query/AbstractQuery.php:10
Stack trace:
#0 /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/ClassLoader.php(571): include()
#1 /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/stema/pub...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('WPML\\TM\\Jobs\\Qu...')
#3 /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/query/PostQuery.php(7): spl_autoload_call('WPML\\TM\\Jobs\\Qu...')
#4 /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/ClassLoader.php(571): include('/home/stema/pub...')
#5 /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/stema/pub...')
#6 [ in /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/query/AbstractQuery.php on line 10

Variations-disappeared.png
May 12, 2023 at 6:28 pm #13639109

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you,

There are 3 fatal errors 1 pointing to WooCommerce and 2 to WPML

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

May 16, 2023 at 6:57 pm #13659143

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for the access details!

I was able to get the site to a minimal environment to test.

- How are you triggering the fatal error -> what are the steps, as I am not able to trigger it in the staging environment

- I do see the issue with the variation missing in the default language whereas in the translation it shows OK and I believe it shows OK in the front end too, right?

hidden link

Screen Shot 2023-05-16 at 11.56.59 AM.png
May 17, 2023 at 7:05 am #13661025

georgeC-7

Hello,
The error usually was triggered when I edited a product, but not always. On some products and it was on random occasions.

Do you think there is a conflict with any plugin? Also, concerning the missing variations, why do you think this happened?

May 18, 2023 at 4:32 am #13668885

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you,

I have not been able to reproduce the fatal errors, but I did reproduce the variation issue and have escalated it to our second-tier team.

Once there is news we will update you here.

May 19, 2023 at 2:11 pm #13680063

georgeC-7

Hi again,
Do you have any news from your team?

I would also like to give you access to the live site to see the errors produced there. Unfortunately the errors continue. When trying to edit a product or even an order a not found page is displayed.

May 19, 2023 at 5:50 pm #13680981

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

There is no news at the moment but I will be updating you shortly.

I have enabled the private field reply to provide access to the live site. Please share with me which product is showcasing this behavior(error and 404) so I can ensure I am able to reproduce

May 23, 2023 at 4:16 am #13694443

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hello,

The database entries for the variations are corrupted. The best fix is to delete and re-create the variation in the product that is experiencing this issue.

May 31, 2023 at 8:35 pm #13749971

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

It is not clear what could have started the issue, possibly a migration has gone bad but can't really say for sure.

For the fatal error, when following the steps with the variations does it resolve the fatal error also?

Does it get triggered with any product or specific ones on the live site?

June 6, 2023 at 9:48 am #13777263

georgeC-7

Hi again,
unfortunately the issue persists. We have resolved the variations issue by deleting and adding them again, however I still get fatal error and all these errors make the products/order editing really slow.

I know manage to reproduce the fatal error when from the admin side menu I click on Woocommerce tab. Then I get these errors

[06-Jun-2023 09:32:43 UTC] PHP Fatal error: Uncaught Error: Call to undefined function icl_get_string_id() in /home/stema/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php:332
Stack trace:
#0 /home/stema/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php(93): WCML_WC_Gateways->get_gateway_string_id('Pay on delivery', 'cod', 'title')
#1 /home/stema/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php(78): WCML_WC_Gateways->register_gateway_settings_strings('cod', Array)
#2 [internal function]: WCML_WC_Gateways->loaded_woocommerce_payment_gateways(Array)
#3 /home/stema/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(371): call_user_func_array(Array, Array)
#4 /home/stema/public_html/wp-includes/class-wp-hook.php(308): WPML\FP\Fns::WPML\FP\{closure}(Array)
#5 /home/stema/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#6 /home/stema/public_html/wp-content/plugins/woocommerce/includes in /home/stema/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-wc-gateways.php on line 332

[06-Jun-2023 09:40:36 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/stema/public_html/wp-content/plugins/woocommerce-multilingual/classes/Rest/Wrapper/Orders/Languages.php on line 46

[06-Jun-2023 09:43:22 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/stema/public_html/wp-content/plugins/woocommerce-multilingual/classes/Rest/Wrapper/Orders/Languages.php on line 46

[06-Jun-2023 09:45:31 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/stema/public_html/wp-content/plugins/woocommerce-multilingual/classes/Rest/Wrapper/Orders/Languages.php on line 46

Do you have any suggestions?

June 6, 2023 at 9:36 pm #13781523

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for updating me! I have tried to reproduce this behavior but I am not able to.

I go to orders->access order and try this multiple times, then I go to products->edit a product multiple times but I cannot reproduce the fatal error