WPML
الحالة
محلولة بواسطة المطور
الإضافة/القالب ذو الصلة
ThemeREX Addons
وسوم الموضوع
Compatibility

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

عند استخدام ThemeREX Addons مع WPML، قد تواجه خطأ PHP فادحاً في الصفحات المترجمة التي تتضمن ودجت Testimonials. رسالة الخطأ هي:

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in .../wp-content/plugins/trx_addons/cpt/testimonials/tpl.default-item.php:33

حل بديل مؤقت

لمنع هذا الخطأ، اجعل الحقول المخصصة وسمات الكود المختصر ذات الصلة قابلة للترجمة.


  • اذهب إلى WPML > إعدادات > تكوين XML مخصص في لوحة تحكم WordPress.

  • أضف تكوين XML التالي واحفظ:
    <wpml-config>
      <custom-fields>
        <custom-field action="translate">trx_addons_options</custom-field>
      </custom-fields>
      <shortcodes>
        <shortcode>
          <tag>trx_sc_testimonials</tag>
          <attributes>
            <attribute type="taxonomy-ids" sub-type="cpt_testimonials_group">cat</attribute>
            <attribute type="post-ids" sub-type="cpt_testimonials">ids</attribute>
            <attribute>subtitle</attribute>
          </attributes>
        </shortcode>
      </shortcodes>
    </wpml-config>
            

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