- סטטוס
- נפתר
- סוג
- באג
- דווח עבור
- WPML Multilingual CMS 4.6.3
- נפתר ב־
- WPML 4.6.5
- תגיות נושא
- Bug
סקירת התקלה
זיהינו בעיה שבה הודעות WPML עלולות לעיתים לגרום לשגיאות קריטיות. בעיה זו נגרמת עקב השחתה במפתח wpml_notices במסד הנתונים. ייתכן שתיתקל בהודעת שגיאה דומה כתוצאה מכך:
Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in ...\wp-content\plugins\sitepress-multilingual-cms\classes\notices\class-wpml-notices.php:373 Stack trace: #0 ...\wp-content\plugins\sitepress-multilingual-cms\classes\notices\class-wpml-notices.php(159): WPML_Notices->group_and_id_exist('taxonomy-term-h...', 'brand') #1 ...\wp-content\plugins\sitepress-multilingual-cms\classes\notices\class-wpml-notices.php(112): WPML_Notices->notice_exists(Object(WPML_Notice)) #2 ...\wp-content\plugins\sitepress-multilingual-cms\classes\taxonomy-term-translation\class-wpml-taxonomy-translation-help-notice.php(111): WPML_Notices->add_notice(Object(WPML_Notice)) #3 ...\wp-content\plugins\sitepress-multilingual-cms\classes\taxonomy-term-translation\class-wpml-taxonomy-translation-help-notice.php(70): WPML_Taxonomy_Translation_Help_Notice->add_term_help_notice_to_admin_notices() #4 ...\wp-includes\class-wp-hook.php(308): WPML_Taxonomy_Translation_Help_Notice->add_help_notice('') #5 ...\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #6 ...\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #7 ...\wp-admin\admin.php(175): do_action('admin_init') #8 ...\wp-admin\edit-tags.php(10): require_once('...') #9 {main} thrown in ...\wp-content\plugins\sitepress-multilingual-cms\classes\notices\class-wpml-notices.php on line 373
פתרון עוקף
הפתרון העוקף הנוכחי לבעיה זו הוא להסיר את המפתח wpml_notices מטבלת האפשרויות.
- ודא שיש לך גיבוי מלא של האתר לפני שתמשיך.
- גש למסד הנתונים שלך.
- פתח את הטבלה wp_options.
- חפש את המפתח wpml_notices .
- הסר אותו.
הוא ייווצר מחדש באופן אוטומטי והשגיאה אמורה להיעלם.