סקירת התקלה
ייתכן שתיתקל בבעיה שבה דפים אינם מסומנים כמתורגמים לאחר השלמת התרגום ל־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 ) ); }