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

The configuration parameter "componentType" is a required for "advanced_pricing_button" component. #5645

Closed
j1nx3d opened this issue Jul 14, 2016 · 22 comments
Labels
bug report Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release

Comments

@j1nx3d
Copy link

j1nx3d commented Jul 14, 2016

Steps to reproduce

  1. Install Magento 2.1 from composer
  2. Add new Attribute set from Default.
  3. Removed and ReOrder Attributes.
  4. Deleted "Advanced Pricing" and some other groups.

Expected result

  1. When creating a new product
  2. Select the new Attribute set
  3. Shows the new attributes and new order

Actual result

  1. When creating a new product
  2. Default Attribute set, works without trouble
  3. Select the new Attribute set breaks the ajax.
  4. Error Page
    Exception #0 (Magento\Framework\Exception\LocalizedException): The configuration parameter "componentType" is a required for "advanced_pricing_button" component.

WorkAround this problem

I think the problem is due to the missing Advanced Pricing group on the new Attribute set, I tried to only create the new Advanced Pricing group. but didn't work.
I have to add the default attributes on that group again (special_price, special_from_date, special_to_date, cost, tier_price, msrp, msrp_display_actual_price_type, price_view)

@avra911
Copy link

avra911 commented Jul 15, 2016

I had to change the attribute_group_code and tab_group_code in eav_attribute_group table to make the edit product work again (see: https://nimbus.everhelper.me/client/notes/share/523802/gflibimm42igvlrh49yd).

@malaiselvan
Copy link

I am getting the same issue not sure what to change... Cane someone help please.

image

@j1nx3d
Copy link
Author

j1nx3d commented Jul 25, 2016

@malaiselvan did you added an attribute to the Advanced Pricing Group?,
You can do it from the attribute set admin panel. I think you need at least one attribute, I left on that group special_price, special_from_date and special_to_date.

I also added the group from the admin panel, did you create the Advanced Pricing from the panel or directly on the database?

FYI on my database the tab_group_code is null on that table.

@yaro-tr
Copy link

yaro-tr commented Oct 7, 2016

SQL:

UPDATE eav_attribute_group SET tab_group_code='advanced' WHERE attribute_group_name LIKE '%{PRICE}%'
UPDATE eav_attribute_group SET attribute_group_code = 'advanced-pricing' WHERE attribute_group_name LIKE '%{PRICE}%'

Do not copy paste code!

{PRICE} - is attribute group where exists all attributes, like price, special_price, group_price etc...

That code help me solve problem after import from Magento 1.x - to Magento 2.x.

After SQL code, run magento indexer:reindex in console, and cache:flush(not sure that last one needed)

@JosephMaxwell
Copy link
Contributor

This fix (https://github.com/SwiftOtter/AdvancedPricingBug) may solve the problem for you. Per this issue thread (#5236), others suggested the code update as the solution. Give it a whirl and let me know.

@sumanparihar
Copy link

It's not fixed after install AdvancedPricingBug module.
The configuration parameter "componentType" is a required for "advanced_pricing_button" component.

@simonrl
Copy link

simonrl commented Jul 3, 2017

@sumanparihar The fix worked for me. Did you activate the module, deleted static assets, re-compiled the system, cleared the cache? Do you run developer or production mode?

@oleg-onufer
Copy link
Contributor

Hi @j1nx3d.
Thanks for reporting this issue.
Internal ticket MAGETWO-70455 was created.

@veloraven veloraven added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jul 4, 2017
@rip057
Copy link

rip057 commented Jul 4, 2017

fwiw my issue, not being able to edit certain products, is rooted in the use of a Migration_Default attribute set that i still have lingering around from a db importation made a really really long time ago. probably 1.9.2 -> 2.0.0 Only my products with attribute set of one of the migration ones are having the editting issue. This is not the first and surely wont be the last that this old migrated dataset has caused me issues with some new edition of Magento. It would be nice if you guys could include in a new release a script that would clean up this old and possibly improper migration, or at least keep in mind that some of us have been with you guys for a while, and we will still have artifacts from earlier upgrades....

As soon as I updated all my items with Migration_Default attribute set id to Default attribute set id, I can edit all products again.

So if your issue is not being able to edit products on the back end this fixed it for me, although I do have to say my Migration_Default attribute set, doesnt contain anything that the Default doesnt contain, idk. I have tinkered with it for a few hours now to see what the difference is and i cant find the culprit just yet...

@rip057
Copy link

rip057 commented Jul 4, 2017

Ok so I have honed down where my issue arises from again reminding that this is happening in my migration default attribute set id items, and that this prevents me from editting the product in the back end resulting in this output in the report log

a:4:{i:0;s:98:"The configuration parameter "componentType" is a required for "advanced_pricing_button" component.";i:1;s:7067:"#0 /var/www/magento2/vendor/magento/framework/View/Element/UiComponentFactory.php(361): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#1 /var/www/magento2/vendor/magento/framework/View/Element/UiComponentFactory.php(361): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#2 /var/www/magento2/vendor/magento/framework/View/Element/UiComponentFactory.php(361): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#3 /var/www/magento2/vendor/magento/framework/View/Element/UiComponentFactory.php(272): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
#4 /var/www/magento2/vendor/magento/framework/View/Element/UiComponentFactory.php(164): Magento\Framework\View\Element\UiComponentFactory->mergeMetadata('product_form', Array, false)
#5 /var/www/magento2/vendor/magento/framework/View/Layout/Generator/UiComponent.php(124): Magento\Framework\View\Element\UiComponentFactory->create('product_form', NULL, Array)
#6 /var/www/magento2/vendor/magento/framework/View/Layout/Generator/UiComponent.php(93): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'product_form', Array, Object(Magento\Framework\View\Layout\Interceptor))
#7 /var/www/magento2/vendor/magento/framework/View/Layout/GeneratorPool.php(86): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#8 /var/www/magento2/vendor/magento/framework/View/Layout.php(327): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#9 /var/www/magento2/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout->generateElements()
#10 /var/www/magento2/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#11 /var/www/magento2/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#12 /var/www/magento2/vendor/magento/framework/View/Layout.php(244): Magento\Framework\View\Layout\Builder->build()
#13 /var/www/magento2/vendor/magento/framework/View/Layout.php(859): Magento\Framework\View\Layout->build()
#14 /var/www/magento2/vendor/magento/module-backend/Model/View/Result/Page.php(59): Magento\Framework\View\Layout->getBlock('menu')
#15 /var/www/magento2/vendor/magento/module-catalog/Controller/Adminhtml/Product/Edit.php(69): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Catalog...')
#16 /var/www/magento2/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Product\Edit->execute()
#17 /var/www/magento2/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /var/www/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callParent('dispatch', Array)
#20 /var/www/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Array, 'adminAuthentica...')
#21 /var/www/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#22 /var/www/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#23 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Array, 'adminMassaction...')
#24 /var/www/magento2/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#25 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#26 /var/www/magento2/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Edit/Interceptor.php(26): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callPlugins('dispatch', Array, Array)
#27 /var/www/magento2/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#28 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /var/www/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#30 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#31 /var/www/magento2/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#32 /var/www/magento2/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#33 /var/www/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#34 /var/www/magento2/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#35 /var/www/magento2/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#36 /var/www/magento2/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#37 {main}";s:3:"url";s:113:"/admin_kmcs89/catalog/product/edit/id/16111/key/cdb9965db70813478a385c94567d2150108ba39ef3f1c277dfac5e25da2ed4c1/";s:11:"script_name";s:10:"/index.php";}

This is cured by having the product attribute tier_price in a sub group that can have any name for whatever attribute set that you are experiencing this issue with. at least this solves the issue for me, but have converted all my migration_default attribute id items to the normal default.

@magento-engcom-team magento-engcom-team added bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@j1nx3d, thank you for your report.
We've created internal ticket(s) MAGETWO-70455 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.2.x Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 10, 2017
@luckyduck
Copy link

Any updates on this one?

@rip057
Copy link

rip057 commented Feb 22, 2018

Pretty sure this isn't a Magento issue per se as most people experiencing this problem are people who have updated and don't have the now required attribute of tier_price in their adv pricing group. There may be another attribute that you need to add into your attribute_set for whatever attribute_set_id is the one the products causing you issues are using...

I posted this just up there

"This is cured by having the product attribute tier_price in a sub group that can have any name for whatever attribute set that you are experiencing this issue with."

1 similar comment
@rip057
Copy link

rip057 commented Feb 22, 2018

Pretty sure this isn't a Magento issue per se as most people experiencing this problem are people who have updated and don't have the now required attribute of tier_price in their adv pricing group. There may be another attribute that you need to add into your attribute_set for whatever attribute_set_id is the one the products causing you issues are using...

I posted this just up there

"This is cured by having the product attribute tier_price in a sub group that can have any name for whatever attribute set that you are experiencing this issue with."

@luckyduck
Copy link

luckyduck commented Feb 22, 2018

I am experiencing a similar issue, which I thought was related to this. When I try to create a bundle product on 2.1.9, magento throws an exception:

Exception #0 (Magento\Framework\Exception\LocalizedException): The configuration parameter "componentType" is a required for "special_price" component.

This happens when I click on create product, not when I save. I don't even get to see the product_form.

So, do you think this is maybe another problem?

@rip057
Copy link

rip057 commented Feb 22, 2018 via email

@magento-engcom-team magento-engcom-team added the Event: distributed-cd Distributed Contribution Day label Mar 19, 2018
@magento-engcom-team magento-engcom-team removed the Event: distributed-cd Distributed Contribution Day label Apr 13, 2018
@magento-engcom-team magento-engcom-team removed the Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release label Oct 1, 2019
@magento-engcom-team
Copy link
Contributor

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

Please feel free to comment or reopen according to the Issue reporting guidelines
the ticket if you are still facing this issue on the latest 2.x-develop branch. Thank you for collaboration.

@aliomattux
Copy link

aliomattux commented Oct 23, 2019

I experience the same issue on migrated database from 1.9.2.3 to 2.3.3.
An uncaught programming exception happens because specific attributes are not a part of a specific attribute group. If these attributes MUST be in an attribute group with a specific code AND the development team does not want to remedy the integrity problem, then the development team should not permit the attributes being moved from an attribute group - Migrated database should also have these attributes moved to the appropriate group automatically.

This issue should be fixed because a user can freely cause an integrity violation and have no feedback from the application as to why the error happens and that making changes will cause exceptions. This is an immature problem to happen in an evolved enterprise platform. IMO it is bad programming practice to have the backend depend on attributes existing in a specific group and allow the user to break the ability to view/update a product.

At the very least, add a caught exception to explain to the user that the attributes cannot be loaded instead of displaying a generic error which doesn't have meaning to a user.

@rip057
Copy link

rip057 commented Oct 23, 2019 via email

@aliomattux
Copy link

You have an attribute that is not defined somewhere. If you read this entire thread there is a how to to fix this issue.

On Wed, Oct 23, 2019, 5:25 PM Kyle Waid @.***> wrote: I experience the same issue on migrated database from 1.9.2.3 to 2.3.3. I have a lot of trouble with this kind of issue. The reason being because the error is not clear in explaining the problem, and because in my opinion the problem is stupid. An uncaught programming exception happens because specific attributes are not a part of a specific attribute group. The application freely allows you to move the attributes without any warning that doing so will cause an error. It wastes my time. In my opinion this is a poorly programmed function and still years later it is not fixed. I am glad that I was able to find the bug report and resolve the issue myself, however am not happy that this software app at this stage of development has this kind of problem. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#5645?email_source=notifications&email_token=ACORK4RX2JCJPZ4PAXS3EV3QQDFLXA5CNFSM4CJSYQQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECDCDSI#issuecomment-545661385>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACORK4V7JGVOJWZ23QYCBZLQQDFLXANCNFSM4CJSYQQQ .

If you see in my post, I did fix the issue myself and I no longer face the issue. The exact resolution for me was to ensure that all attributes that were in the default attribute set advanced pricing group were also in my custom attribute group. During migration the attribute set is Migrated_Pricing. I renamed it to Advanced Pricing. I verified that the attribute group code in the table others mentioned said advanced-pricing, then added special price, tier_price, etc to the group. After I saved I was able to save the product.

@rip057
Copy link

rip057 commented Oct 23, 2019 via email

@rip057
Copy link

rip057 commented Oct 23, 2019 via email

slavvka pushed a commit that referenced this issue May 6, 2020
[TSG][PHP7.4] MFTF Fixes for 2.4 (pr38) (2.4-develop-php74)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release
Projects
None yet
Development

No branches or pull requests