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

Field group title overwritten with ACF6 #1252

Closed
herrvigg opened this issue Nov 18, 2022 · 2 comments
Closed

Field group title overwritten with ACF6 #1252

herrvigg opened this issue Nov 18, 2022 · 2 comments
Labels
module: ACF Integration with ACF severity: minor Minor functionality

Comments

@herrvigg
Copy link
Collaborator

There's a regression with ACF6 for the field group title.
image

Only the last language is saved and it overwrites the others.
Error in the console log when the page is loaded:

No form found for translatable field id= title

The problem with the new design is the title field is not a child item directly below the form... 😕
QT-XT doesn't send the current language being edited nor the hidden fields containing the title translations for each language.

Instead of following a usual HTML structure, ACF6 have a <input form="post" ... attribute. This allows to have a field detached from the form subtree.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#form

It is the first time this type of form structure is seen. It requires changes in the QTX Javascript code.

@herrvigg herrvigg added the module: ACF Integration with ACF label Nov 18, 2022
@herrvigg herrvigg mentioned this issue Nov 18, 2022
herrvigg added a commit that referenced this issue Nov 18, 2022
Input elements are usually created below a form to be submitted.
There's another alternative with the `form` attribute that allows
them to be placed anywhere in the document.

This field was ignored by qTranslate, assuming all input below form.
This problem was first seen with ACF6 field group title (#1252).
This patches considers this attribute before creating new elements.
It is read in priority, before looking for the closest form.
herrvigg added a commit that referenced this issue Nov 18, 2022
Input elements are usually created below a form to be submitted.
There's another alternative with the `form` attribute that allows
them to be placed anywhere in the document.

This field was ignored by qTranslate, assuming all inputs below a form.
This problem was first seen with ACF6 field group title (#1252).
This patch considers this attribute before creating new elements.
It is read in priority, before looking for the closest form.
herrvigg added a commit that referenced this issue Nov 18, 2022
Input elements are usually created below a form to be submitted.
There's another alternative with the `form` attribute that allows
them to be placed anywhere in the document.

This field was ignored by qTranslate, assuming all inputs below a form.
This problem was first seen with ACF6 field group title (#1252).
This patch considers this attribute before creating new elements.
It is read in priority, before looking for the closest form.
@herrvigg
Copy link
Collaborator Author

Fixed with #1253 which is a generic solution, not just for ACF6.

@herrvigg
Copy link
Collaborator Author

Released in 3.13.0.

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