Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
herrvigg opened this issue Nov 19, 2022 · 1 comment
Closed

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

herrvigg opened this issue Nov 19, 2022 · 1 comment
Labels
module: ACF Integration with ACF severity: minor Minor functionality

Comments

@herrvigg
Copy link
Collaborator

herrvigg commented Nov 19, 2022

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: AdvancedCustomFields/acf#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 herrvigg added the module: ACF Integration with ACF label Nov 19, 2022
herrvigg added a commit that referenced this issue Nov 19, 2022
Use proper API with `acf.findFields` and not `acf.get_fields`..
Add better checks for translatable fields and form.
@herrvigg
Copy link
Collaborator Author

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

@herrvigg herrvigg added the severity: minor Minor functionality label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: ACF Integration with ACF severity: minor Minor functionality
Projects
None yet
Development

No branches or pull requests

1 participant