ภาพรวมของปัญหา
เมื่อใช้ GreenShift 13.2.1 หรือใหม่กว่าร่วมกับ WPML คุณอาจพบปัญหาต่อไปนี้: ในหน้าที่แปล บล็อก Heading, Advanced text และ Button ของ GreenShift จะแสดงข้อความ “This block contains unexpected or invalid content” ในตัวแก้ไขบล็อก หน้าที่แปลจะแสดงข้อความที่ถูกต้องในส่วนหน้าเว็บไซต์ หากคุณแก้ไขบล็อกในตัวแก้ไขบล็อก บล็อกจะกลับไปแสดงข้อความของภาษาเริ่มต้น
วิธีแก้ปัญหาชั่วคราว
ไปที่ WPMLการตั้งค่าการกำหนดค่า XML ที่กำหนดเอง เพิ่มโค้ดต่อไปนี้และบันทึก จากนั้นอัปเดตการแปลของแต่ละหน้าที่ใช้บล็อกเหล่านี้
XML
<wpml-config>
<gutenberg-blocks>
<gutenberg-block type="greenshift-blocks/heading" translate="1" label="Advanced heading">
<xpath>//*[contains(@class, 'gspb_heading')]</xpath>
<key name="headingContent" />
<key name="title" />
<key name="text" />
<key name="textbefore" />
<key name="textafter" />
<key name="customAnchor" />
<key name="subTitle" />
<key name="animatedText"><key name="*" /></key>
<key name="dynamictext"><key name="dynamicField" /></key>
</gutenberg-block>
<gutenberg-block type="greenshift-blocks/text" translate="1" label="Advanced text">
<xpath>//*[contains(@class, 'gspb_text')]</xpath>
<key name="textContent" />
<key name="text" />
<key name="customAnchor" />
<key name="dynamictext"><key name="dynamicField" /></key>
</gutenberg-block>
<gutenberg-block type="greenshift-blocks/button" translate="1" label="Advanced Button">
<xpath>//*[contains(@class, 'gspb_button_wrapper')]</xpath>
<key name="buttonContent" />
<key name="label" />
<key name="buttonLink" />
<key name="customAnchor" />
<key name="closeLabel" />
<key name="openLabel" />
</gutenberg-block>
<gutenberg-block type="greenshift-blocks/buttonbox" translate="1" label="Advanced Button">
<xpath>//*[contains(@class, 'gspb_button_wrapper')]</xpath>
<key name="buttonContent" />
<key name="label" />
<key name="buttonLink" />
<key name="customAnchor" />
<key name="closeLabel" />
<key name="openLabel" />
</gutenberg-block>
</gutenberg-blocks>
</wpml-config>