-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Name attribute shows empty when creating custom fields on product creation form #9944
Comments
Same issue here, added fields by using a Modifier. Fields are shown fine, but the name attribute is empty. |
@PatrickSH, thank you for your report. |
I am working on it. #SQUASHTOBERFEST |
This seems to happen when the product_form.xml field name is a one-word string without a '.'. In the xml referenced by the original reporter, if it was replaced like this:
The name attribute would get inserted as "extra" because of the way the data ends up when the javascript tries to split and slice it. In the working example of the category_form.xml, whether it is one word or two words separated by a ".", the name attribute would get rendered either as, "holder" or "holder[extra]". To resolve this correctly, I think you would need to find where it is responsible for parsing the 'product_form.xml' and make sure that it matches the same way that the xml is parsed on the category creation form as well. I am looking for where this happens now. It also seems like there should be some kind of a check in the abstract.js line referenced above to see if there is an undefined value there. |
Hi @briscoda please accept the invite on the GitHub |
Internal ticket to track issue progress: MAGETWO-82537 |
The issue has been fixed in 2.2-develop branch and will be available with 2.2.2 release soon |
Hi @PatrickSH. Thank you for your report. The fix will be available with the upcoming patch release. |
When i try to add new fields to product creationgform in the html name attribute shows up empty, i tried to add the new field both by extending product_form.xml and by using a modifier but both approches ends up the same - a empty name attribute.
I also added these custom fields to
category_form.xml
cms_page_form.xml
Using the exact same method and here it works perfectly.
Preconditions
Steps to reproduce
1. Extend product_form.xml to your custom module Vendor/Component/view/adminhtml/ui_component/product_form.xml
2. Add the code you need for the custom field to show up i will show my code of both modifier and by using pure XML
Using modifier
di.xml
3. Clear cache and recompile You should now see the field with a blank name attribute
Expected result
Name attribute should not be blank
Actual result
Name attribute shows up blank
The text was updated successfully, but these errors were encountered: