نظرة عامة على المشكلة
قد تواجه مشكلة حيث لا يتم تمييز الصفحات على أنها مترجمة بعد إكمال الترجمة بنسبة 100% باستخدام WPML مع قالب Divi. بالإضافة إلى ذلك، قد يتم تسجيل الخطأ التالي:
PHP Fatal error: Uncaught TypeError: htmlspecialchars_decode(): Argument #1 ($string) must be of type string, array given in .../wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-update-shortcodes-in-content.php:203
حل بديل مؤقت
تم إصلاح هذه المشكلة في WPML 4.7. يحل التحديث المشكلة على موقعك، لذا لا تحتاج إلى هذا الحل البديل المؤقت إلا إذا لم تتمكن من التحديث بعد.
يُرجى التأكد من وجود نسخة احتياطية كاملة لموقعك قبل المتابعة.
- افتح ملف …/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-update-shortcodes-in-content.php.
- ابحث عن السطر 206.
- استبدل:
if ( 'allow_html_tags' !== $encoding ) { $translation = htmlspecialchars( htmlspecialchars_decode( $translation ) ); } - بـ:
// Ensure $translation is a string if (is_array($translation)) { // Handle array to string conversion as needed $translation = implode('', $translation); } if ( 'allow_html_tags' !== $encoding ) { $translation = htmlspecialchars( htmlspecialchars_decode( $translation ) ); }