WPML

סקירת התקלה

Catchable fatal error: Object of class stdClass could not be converted to string in /home/lahjatup/public_html/markkinointiopisto.fi/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-config/wpml-config.class.php on line 252

או

Warning: dirname() expects parameter 1 to be string, object given in /home1/treasure/public_html/dev/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-config/wpml-config.class.php on line 252

שגיאות ה־PHP שלעיל יופיעו בעמודי אזור הניהול שלך, כגון עמודי התוספים, ערכת העיצוב או ניהול תרגוםהגדרת תוכן רב-לשוני.

פתרון עוקף

בעיה זו תוקנה. עדכון לגרסה העדכנית ביותר פותר זאת באתר שלך, לכן אתה זקוק לפתרון עוקף זה רק אם עדיין אינך יכול לעדכן.

  1. התחבר באמצעות FTP
  2. אתר את הקובץ sitepress-multilingual-cms/inc/wpml-config/wpml-config.class.php
  3. אתר את השורה המוזכרת בשגיאת ה־PHP שאתה רואה (252). לדוגמה: 581480-Schermata_2015_03_18_alle_20.43.56
    $type = ( dirname( $file ) == get_template_directory() || dirname( $file ) == get_stylesheet_directory() ) ? 'theme' : 'plugin';
    $admin_text_context = basename( dirname( $file ) );
  4. מחק את שתי שורות הקוד
  5. באותו קובץ, אתר את הקוד הבא (בסביבות שורה 210):
    }else{
     $config = icl_xml2array( file_get_contents( $file ) );
    }
  6. שנה את בלוק הקוד הזה כך שיהיה:
    }else{
    $config = icl_xml2array( file_get_contents( $file ) );
    $type = ( dirname( $file ) == get_template_directory() || dirname( $file ) == get_stylesheet_directory() ) ? 'theme' : 'plugin';
    $admin_text_context = basename( dirname( $file ) );
    }
  7. שמור את הקובץ והעלה אותו לשרת שלך

כל התקלות הידועות

עדיין נתקל בבעיה זו?

אם העדכון אינו פותר זאת, פתח פנייה לתמיכה ואנו נבדוק זאת יחד איתך.