michelR-20
Background of the issue:
Je navigue sur la version française de mon site (hidden link ) et je rencontre un problème. J'ai mis à jour tous les plugins WPML il y a 13 jours.
Symptoms:
Erreur 500 Internal Server Error se produit de manière aléatoire, surtout sur les pages Woocommerce sous le menu "Tout-en-UN".
Questions:
Pourquoi l'erreur 500 se produit-elle sur la version française du site ?
Comment résoudre l'erreur 500 sur les pages Woocommerce ?
michelR-20
My Ticket was translated to French. I prefer to work in English.
Thx
michelR-20
My Service Provider shared this errorlog:
#1 /home/wordpress/doc_root/wp-content/plugins/wpml-string-translation/classes/translations-file-scan/wpml-st-translations-file-registration.php(65): WPML_ST_Translations_File_Registration->save_file_info('%TEXTDOMAIN%', '%TEXTDOMAIN%', '/home/wordpress...')
#2 /home/wordpress/doc_root/wp-includes/class-wp-hook.php(326): WPML_ST_Translations_File_Registration->cached_save_mo_file_info(false, '%TEXTDOMAIN%', '/home/wordpress...')
#3 /home/wordpress/doc_root/wp-includes/plugin.php(205): WP_Hook->apply_filters(false, Array)
#4 /home/wordpress/doc_root/wp-includes/l10n.php(769): apply_filters('override_load_t...', false, '%TEXTDOMAIN%', '/home/wordpress...', 'en_US')
#5 /home/wordpress/doc_root/wp-content/plugins/wpml-string-translation/classes/MO/JustInTime/MO.php(100): load_textdomain('%TEXTDOMAIN%', '/home/wordpress...', 'en_US')
#6 /home/wordpress/doc_root/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Collection.php(228): WPML\ST\MO\JustInTime\MO->WPML\ST\MO\JustInTime\{closure}('/home/wordpress...', 0)
#7 /home/wordpress/doc_root/wp-content/plugins/wpml-string-translation/classes/MO/JustInTime/MO.php(96): WPML\Collect\Support\Collection->each(Object(Closure))
#8 /home/wordpress/doc_root/wp-content/plugins/wpml-string-translation/classes/MO/JustInTime/MO.php(78): WPML\ST\MO\JustInTime\MO->loadTextDomain()
#9 /home/wordpress/doc_root/wp-content/plugins/wpml-string-translation/classes/MO/JustInTime/MO.php(50): WPML\ST\MO\JustInTime\MO->load()
#10 /home/wordpress/doc_root/wp-includes/l10n.php(196): WPML\ST\MO\JustInTime\MO->translate('License Key')
#11 /home/wordpress/doc_root/wp-includes/l10n.php(307): translate('License Key', '%TEXTDOMAIN%')
#12 /home/wordpress/doc_root/wp-content/plugins/kadence-blocks/vendor/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/License_Field.php(84): __('License Key', '%TEXTDOMAIN%')
michelR-20
Here is another Error Log from April 14th:
[14-Apr-2025 13:57:24 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/wordpress/doc_root/wp-content/plugins/wpml-media-translation/classes/media-usage/class-wpml-media-usage.php:39
Stack trace:
#0 /home/wordpress/doc_root/wp-content/plugins/wpml-media-translation/classes/media-usage/class-wpml-media-post-media-usage.php(55): WPML_Media_Usage->add_post(27837)
#1 /home/wordpress/doc_root/wp-includes/class-wp-hook.php(326): WPML_Media_Post_Media_Usage->update_media_usage(27837, Object(WP_Post))
#2 /home/wordpress/doc_root/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#3 /home/wordpress/doc_root/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /home/wordpress/doc_root/wp-includes/post.php(5060): do_action('save_post', 27837, Object(WP_Post), true)
#5 /home/wordpress/doc_root/wp-includes/post.php(5162): wp_insert_post(Array, false, true)
#6 /home/wordpress/doc_root/wp-admin/includes/post.php(453): wp_update_post(Array)
#7 /home/wordpress/doc_root/wp-admin/post.php(227): edit_post()
#8 {main}
thrown in /home/wordpress/doc_root/wp-content/plugins/wpml-media-translation/classes/media-usage/class-wpml-media-usage.php on line 39
Andrey
WPML Supporter since 06/2013
Languages:
English (English )
Russian (Русский )
Timezone:
Europe/Kyiv (GMT+03:00)
Thank you for contacting WPML support.
Could you activate the debug.log and see what is there at the moment of the error?
To enable it, open your wp-config.php file and look for define('WP_DEBUG', false);. Change it to:
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
To enable the error logging to a file on the server, you need to add yet one more similar line:
define( 'WP_DEBUG_LOG', true );
The errors will be saved to a debug.log file inside the /wp-content/directory.
https://wpml.org/documentation/support/debugging-wpml/
But before, can you test the following workaround?
https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/
Before making any changes, please ensure that you back up your database first.
michelR-20
Thanks
Working with your suggestion and my service provider, the new plugin I resently addeded "Clear Cart and Sessions" was the causing the errors.