Critical error + WPML
-
Hello,
When I click on the button “save changes” on general tabs, I have a message “There has been a critical error on this website. Please check your site admin email inbox for instructions.”
I don’t have this problem when I desactivate WPML Multilingual CMS.All is updated. PHP 8.0.27
Any ideas ?
-
Hi,
Can you please do the following – enable WordPress debug mode as described in this article and then repeat this error one more time. After that please check the debug.log file and tell me about any error message that I found.
Regards
[24-Jan-2023 12:58:07 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/advanced-woo-search-pro/includes/class-aws-translate.php:119 Stack trace: 0 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/advanced-woo-search-pro/includes/class-aws-translate.php(56): AWS_Translate->register_wpml_translations() 1 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(308): AWS_Translate->settings_saved() 2 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 3 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 4 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/advanced-woo-search-pro/includes/admin/class-aws-admin-options.php(238): do_action() 5 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/advanced-woo-search-pro/includes/admin/class-aws-admin.php(131): AWS_Admin_Options::update_common_settings() 6 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(308): AWS_Admin->display_admin_page() 7 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 8 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 9 /var/www/vhosts/hitmusic.eu/httpdocs/wp-admin/admin.php(259): do_action() 10 {main} thrown in /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/advanced-woo-search-pro/includes/class-aws-translate.php on line 119 [24-Jan-2023 12:58:12 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/woocommerce-multilingual/compatibility/YikesCustomProductTabs/class-wcml-yikes-custom-product-tabs.php:231 Stack trace: 0 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(308): WCML_YIKES_Custom_Product_Tabs->save_custom_tabs_translation() 1 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 2 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 3 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/inc/translation-jobs/helpers/wpml-save-translation-data-action.class.php(199): do_action() 4 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-private-actions-tm.php(34): WPML_Save_Translation_Data_Action->save_translation() 5 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/class-wpml-tm-ate-jobs.php(85): wpml_tm_save_data() 6 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Download/Consumer.php(32): WPML_TM_ATE_Jobs->apply() 7 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Download/Process.php(36): WPML\TM\ATE\Download\Consumer->process() 8 [internal function]: WPML\TM\ATE\Download\Process->WPML\TM\ATE\Download{closure}() 9 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Collection.php(603): array_map() 10 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Download/Process.php(56): WPML\Collect\Support\Collection->map() 11 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/REST/Download.php(62): WPML\TM\ATE\Download\Process->run() 12 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(1171): WPML\TM\ATE\REST\Download->download() 13 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request() 14 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch() 15 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/rest-api.php(410): WP_REST_Server->serve_request() 16 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(308): rest_api_loaded() 17 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 18 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/plugin.php(565): WP_Hook->do_action() 19 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp.php(399): do_action_ref_array() 20 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp.php(780): WP->parse_request() 21 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/functions.php(1332): WP->main() 22 /var/www/vhosts/hitmusic.eu/httpdocs/wp-blog-header.php(16): wp() 23 /var/www/vhosts/hitmusic.eu/httpdocs/index.php(17): require('…') 24 {main} thrown in /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/woocommerce-multilingual/compatibility/YikesCustomProductTabs/class-wcml-yikes-custom-product-tabs.php on line 231 [24-Jan-2023 12:58:12 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/woocommerce-multilingual/compatibility/YikesCustomProductTabs/class-wcml-yikes-custom-product-tabs.php:231 Stack trace: 0 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(308): WCML_YIKES_Custom_Product_Tabs->save_custom_tabs_translation() 1 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 2 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 3 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/inc/translation-jobs/helpers/wpml-save-translation-data-action.class.php(199): do_action() 4 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-private-actions-tm.php(34): WPML_Save_Translation_Data_Action->save_translation() 5 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/class-wpml-tm-ate-jobs.php(85): wpml_tm_save_data() 6 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Download/Consumer.php(32): WPML_TM_ATE_Jobs->apply() 7 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Download/Process.php(36): WPML\TM\ATE\Download\Consumer->process() 8 [internal function]: WPML\TM\ATE\Download\Process->WPML\TM\ATE\Download{closure}() 9 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Collection.php(603): array_map() 10 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Download/Process.php(56): WPML\Collect\Support\Collection->map() 11 /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/REST/Download.php(62): WPML\TM\ATE\Download\Process->run() 12 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(1171): WPML\TM\ATE\REST\Download->download() 13 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request() 14 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch() 15 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/rest-api.php(410): WP_REST_Server->serve_request() 16 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(308): rest_api_loaded() 17 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 18 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/plugin.php(565): WP_Hook->do_action() 19 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp.php(399): do_action_ref_array() 20 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/class-wp.php(780): WP->parse_request() 21 /var/www/vhosts/hitmusic.eu/httpdocs/wp-includes/functions.php(1332): WP->main() 22 /var/www/vhosts/hitmusic.eu/httpdocs/wp-blog-header.php(16): wp() 23 /var/www/vhosts/hitmusic.eu/httpdocs/index.php(17): require('…') 24 {main} thrown in /var/www/vhosts/hitmusic.eu/httpdocs/wp-content/plugins/woocommerce-multilingual/compatibility/YikesCustomProductTabs/class-wcml-yikes-custom-product-tabs.php on line 231
Please try the following: open wp-content/plugins/advanced-woo-search-pro/includes/class-aws-translate.php file, find lines
foreach ( $options_to_reg as $key => $option ) { icl_register_string( 'aws', $key . '_' . $search_instance_num, $search_instance_settings[$key] ); }
And replace it with
foreach ( $options_to_reg as $key => $option ) { if ( isset( $search_instance_settings[$key] ) ) { icl_register_string( 'aws', $key . '_' . $search_instance_num, $search_instance_settings[$key] ); } }
Then try to save plugin settings one more time. Do you still see that error?
Regards
It seems to work. Thx
- The topic ‘Critical error + WPML’ is closed to new replies.