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: Bug
This topic contains 10 replies, has 2 voices.
Last updated by Bruno Kos 8 months ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
May 7, 2024 at 9:50 am | |
Rick Hunnersen |
Warning: Undefined array key "smaakprofiel88449" in /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php on line 375 Fatal error: Uncaught TypeError: key(): Argument #1 ($array) must be of type array, null given in /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php:375 Stack trace: #0 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php(375): key(NULL) #1 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php(241): WCML_Editor_UI_Product_Job->add_custom_fields_ui_section(Object(WPML_Editor_UI_Field_Section), Array, '88449') #2 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php(86): WCML_Editor_UI_Product_Job->add_elements() #3 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-translation-editor.php(57): WCML_Editor_UI_Product_Job->__construct(Array, Object(woocommerce_wpml), Object(SitePress), Object(wpdb)) #4 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/class-wp-hook.php(324): WCML_Translation_Editor->fetch_translation_job_for_editor(NULL, Array) #5 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array) #6 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-editor/class-wpml-translation-editor-ui.php(342): apply_filters('wpml-translatio...', NULL, Array) #7 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-editor/class-wpml-translation-editor-ui.php(185): WPML_Translation_Editor_UI->filter_the_model(Array) #8 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-editor/class-wpml-translation-editor-ui.php(91): WPML_Translation_Editor_UI->output_model() #9 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-queue/class-wpml-translations-queue.php(78): WPML_Translation_Editor_UI->render() #10 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/class-wpml-translation-management.php(379): WPML_Translations_Queue->display() #11 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/class-wp-hook.php(324): WPML_Translation_Management->translation_queue_page('') #12 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #13 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #14 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-admin/admin.php(259): do_action('wpml_page_tm/me...') #15 {main} thrown in /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php on line 375 |
May 7, 2024 at 10:21 am | |
May 7, 2024 at 10:38 am | |
May 7, 2024 at 1:22 pm #15602262 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
What if you try: plugins\woocommerce-multilingual\inc\translation-editor\class-wcml-editor-ui-product-job.php on line 1015 change: return count( $values ) === 1 ? $values[0] : $values; to return $values; |
May 7, 2024 at 2:14 pm #15602626 | |
Rick Hunnersen |
Hi, I changed it, but it generated a new critical error: Warning: Undefined array key "smaaksensatie89695" in /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php on line 375 Fatal error: Uncaught TypeError: key(): Argument #1 ($array) must be of type array, null given in /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php:375 Stack trace: #0 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php(375): key(NULL) #1 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php(241): WCML_Editor_UI_Product_Job->add_custom_fields_ui_section(Object(WPML_Editor_UI_Field_Section), Array, '89695') #2 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php(86): WCML_Editor_UI_Product_Job->add_elements() #3 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-translation-editor.php(57): WCML_Editor_UI_Product_Job->__construct(Array, Object(woocommerce_wpml), Object(SitePress), Object(wpdb)) #4 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/class-wp-hook.php(324): WCML_Translation_Editor->fetch_translation_job_for_editor(NULL, Array) #5 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array) #6 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-editor/class-wpml-translation-editor-ui.php(342): apply_filters('wpml-translatio...', NULL, Array) #7 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-editor/class-wpml-translation-editor-ui.php(185): WPML_Translation_Editor_UI->filter_the_model(Array) #8 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-editor/class-wpml-translation-editor-ui.php(91): WPML_Translation_Editor_UI->output_model() #9 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-queue/class-wpml-translations-queue.php(78): WPML_Translation_Editor_UI->render() #10 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/sitepress-multilingual-cms/classes/class-wpml-translation-management.php(379): WPML_Translations_Queue->display() #11 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/class-wp-hook.php(324): WPML_Translation_Management->translation_queue_page('') #12 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #13 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #14 /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-admin/admin.php(259): do_action('wpml_page_tm/me...') #15 {main} thrown in /var/www/vhosts/noisecancellingheadphones.nl/staging.rhun.it/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-editor-ui-product-job.php on line 375 -- This is with the translation settings 'Translatable' or this custom field. When I change it to 'Dont translate' the critical error is gone. But this is not what I want. Any other suggestions? |
May 8, 2024 at 6:36 am #15604338 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
This is escalated to our 2nd tier team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you. |
May 8, 2024 at 10:08 am #15605327 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
We deployed the site you sent and it doesn't seem to be happening (in our localhost). hidden link Can you disable all the caching (as we see you are using using LiteSpeed Cache) and try then? |
May 8, 2024 at 10:11 am #15605331 | |
Rick Hunnersen |
Did you enable 'Smaaksensatie' in the ACF custom field to translatable? This is the whole issue. In the video 'Smaaksensatie' isn't shown as a field to translate. |
May 8, 2024 at 12:59 pm #15606212 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
It seems the issue is with the `smaaksensatie` meta key in your WordPress database, which holds a serialized array with no actual value, adding complexity to the logic that typically expects an array. Removing this meta key should resolve the problem. Can you please try the following steps: 1. First, verify the current values for the `smaaksensatie` meta key with this SQL query: SELECT * FROM `wp_postmeta` WHERE `post_id` IN (SELECT `ID` FROM `wp_posts` WHERE `post_type` = 'product_variation') AND `meta_key` = 'smaaksensatie' This will display the meta entries for product variations. 2. If the query confirms the values are as expected (i.e., `a:1:{i:0;s:0:"";}`), remove them using this SQL command: DELETE FROM `wp_postmeta` WHERE `post_id` IN (SELECT `ID` FROM `wp_posts` WHERE `post_type` = 'product_variation') AND `meta_key` = 'smaaksensatie' This action will delete the unneeded meta key entries, potentially clearing up the issue. |
May 8, 2024 at 1:51 pm #15606349 | |
Rick Hunnersen |
See attached |
May 9, 2024 at 6:25 am #15608615 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Did you adjust the query to match your database prefix? Is it wp_postmeta or something else? |
May 9, 2024 at 6:31 am #15608623 | |
Rick Hunnersen |
This is what I use: SELECT |
May 9, 2024 at 7:04 am #15608818 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Can you install https://wordpress.org/plugins/pexlechris-adminer/ on the staging site so I could check? I will only try the select clause. |