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

วิธีแก้ปัญหาชั่วคราว

เพื่อป้องกันข้อผิดพลาดนี้ ให้ตั้งค่าฟิลด์ที่กำหนดเองและแอตทริบิวต์ shortcode ที่เกี่ยวข้องให้แปลได้


  • ไปที่ 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>
            

ปัญหาที่ทราบแล้วทั้งหมด →