WPML
الحالة
محلولة
أُبلغ عنها لـ
WPML Multilingual CMS 4.6.12
تم حلها في
WPML 4.7
الإضافة/القالب ذو الصلة
Divi
وسوم الموضوع
Compatibility

نظرة عامة على المشكلة

قد تواجه مشكلة حيث لا يتم تمييز الصفحات على أنها مترجمة بعد إكمال الترجمة بنسبة 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

حل بديل مؤقت

يُرجى التأكد من وجود نسخة احتياطية كاملة لموقعك قبل المتابعة.


  • افتح ملف …/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 ) );
    		}

جميع المشاكل المعروفة →