-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Magento CE 2.1 Not able to add attribute to category #5438
Comments
I am having similar issues in CE 2.1. I've had issues with the same controller. It seems to have a hardcoded reference to 'image'. Is there some other controller we should be using when adding additional image attributes to categories? I am also having problems when trying to add attributes that have custom source models. Could you please provide some documentation on how this should be done? Is it correct to extend \Magento\Catalog\Model\Category\DataProvider and to have to override the getFieldsMap() function? There seems to be a hardcoded array within the original function. |
Yes right.. anyhow I figured it out and you are right I got to extend But it should me something dynamic that it adds the attribute direct in
|
@guz-anton please check if it has something to do with ui components |
Hi, |
The problem with the 'image' attribute type is that the attribute code 'image' has been hard-coded in many places which means that the category image attribute backend model actually only works with one specific attribute-code (which happens to be called 'image' as well).
|
Do you know when your pull request will make it to release? |
I have no clue :) I would say that one is better off just patching the changes into their installation (which is how we decided to roll) and remove them on the next release. |
Just patched-in #5978 using di.xml overrides. It works perfectly. I hope it makes it into the next release. Also, Thank you so much! |
Nice! We use this https://github.com/cweagans/composer-patches to incorporate patches to our builds. Might be easier to include than go through framework :) |
@ngagestudios, thank you for your report. |
This needs an extra fix in Specifically lines 497 & 498 Should use
|
Fixed Issues: - MC-31362: Media folder update - MC-30944: Incorrect flow of saving Newsletter templates - MC-31357: Customer file uploader update
Magento CE 2.1 Not able to add Custom attribute to category dynamically like Magento 1 or Magento 2.0 version
I had to go to here to add xml part to get the fields
/vendor/magento/module-catalog/view/adminhtml/ui_component/category_form.xml
I don't think its good idea to add xml code everytime you add new attribute
Even after adding xml code.. there is an issue for custom image attribute. On Adminhtml/Catalog/Category/Image/Upload controller
The text was updated successfully, but these errors were encountered: