qtranslate / qtranslate-xt

qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
550 stars 103 forks source link

JS errors in ACF6 with translation of standard field types #1254

Closed herrvigg closed 1 year ago

herrvigg commented 1 year ago

This error appears in the console for a field group with the option "translation of standard field types" enabled:

Cannot read properties of undefined (reading 'id')

There's a regression with acf.findFields in ACF6 returning unexpected elements such as data-type="tab". Reported here: https://github.com/AdvancedCustomFields/acf/issues/765

Moreover qTranslate should not use acf.get_fields, that is an internal function not part of the API. The correct functions to use are acf.getFields or acf.findFields. https://www.advancedcustomfields.com/resources/javascript-api/#functions-getfields

herrvigg commented 1 year ago

The fix in #1255 filters the child elements with another selector so the bug reported in https://github.com/AdvancedCustomFields/acf/issues/765 is not impactful for now.