Background of the issue:
I am trying to save a post in the French language (second language).
Symptoms:
I got a fatal error: Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, bool given in /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php:319 Stack trace: #0 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php(319): array_filter() #1 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php(92): WPML_Element_Translation_Package->add_custom_field_contents() #2 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php(13): WPML_Element_Translation_Package->create_translation_package() #3 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-post-actions.class.php(72): WPML_TM_Action_Helper->create_translation_package() #4 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php(947): WPML_TM_Post_Actions->save_post_actions() #5 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/class-wp-hook.php(324): wpml_tm_save_post() #6 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #7 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/plugin.php(517): WP_Hook->do_action() #8 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(213): do_action() #9 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-admin-post-actions.class.php(123): WPML_Post_Translation->after_save_post() #10 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/class-wp-hook.php(326): WPML_Admin_Post_Actions->save_post_actions() #11 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #12 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/plugin.php(517): WP_Hook->do_action() #13 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/post.php(4891): do_action() #14 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/post.php(4993): wp_insert_post() #15 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/fusion-builder/shortcodes/fusion-global.php(209): wp_update_post() #16 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/class-wp-hook.php(324): FusionSC_Global->update_global_elements() #17 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/plugin.php(205): WP_Hook->apply_filters() #18 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/post.php(2957): apply_filters() #19 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/post.php(2842): sanitize_post_field() #20 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/post.php(4247): sanitize_post() #21 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-includes/post.php(4993): wp_insert_post() #22 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-admin/includes/post.php(453): wp_update_post() #23 /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-admin/post.php(227): edit_post() #24 {main} thrown in /home/1008615.cloudwaysapps.com/fcshkmukpp/public_html/webroot/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 319
Questions:
Why am I getting a fatal error when saving a post in the French language?
How can I resolve the TypeError in the WPML plugin?
Gérer le consentement aux cookies
Nous utilisons des cookies pour optimiser notre site web et nos services. Votre consentement nous permet de traiter des données telles que le comportement de navigation. L'absence de consentement peut affecter certaines fonctionnalités.
Fonctionnel
Toujours activé
Nécessaire au bon fonctionnement et à la communication de notre site web.
Préférences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistiques
Nous les utilisons pour analyser les statistiques de notre site. Les informations collectées sont totalement anonymes. Le stockage ou l'accès technique qui est utilisé exclusivement à des fins statistiques anonymes. Sans citation à comparaître, la conformité volontaire de la part de votre fournisseur d'accès Internet ou d'autres dossiers d'un tiers, les informations stockées ou récupérées à cette fin ne peuvent généralement pas être utilisées pour vous identifier.
Marketing
Ces cookies suivent votre navigation pour vous proposer des publicités pertinentes pour vous.