- Initial issue: Commerce inline forms are not submitted via ief actions (i.e.: in a promotion referenced via an ief widget, the offer and conditions fields configuration is not properly formed on submit and not saved if the ief is closed).
- Added:
hook_commerce_inline_form_alter()is not fired when the inline form is nested in an ief.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | commerce-improve-inline-form-support-for-ief-3262327-5.patch | 1.12 KB | nicolasgraph |
| #2 | commerce-execute-elements-submit-on-ief-submit-3262327-2.patch | 526 bytes | nicolasgraph |
Comments
Comment #2
nicolasgraphHere is the patch I generated today. Needs more tests but seems to work.
Should we test that ief is installed in the new condition?
Comment #3
nicolasgraphComment #4
nicolasgraphComment #5
nicolasgraphWhile the plugin configuration is now correctly saved on ief submission, I faced to another issue :
hook_commerce_inline_form_alter()is not fired when the inline form is nested into an ief.Here is a new patch to fix that.
Comment #6
nicolasgraphComment #7
nicolasgraphComment #8
nicolasgraphComment #9
tonytheferg commentedPatch works in Commerce Core 8.x-2.33. Thanks! We can close my issue as a duplicate of this one if you would like.
Comment #10
jsacksick commented@NicolasGraph @tonythefer: Care to provide some information about the bug? Reproducible steps? It's unclear to me what the problem is by reading the initial report.
Comment #11
tonytheferg commentedYeah. This is a duplicate of my issue that's referenced.
Here is the steps from my issue:
Steps to reproduce
Create a simple product type see commerce documentationAt admin/commerce/config/product-types/simple_product/edit/form-display, set the widget for the "Variations" field to "Single variation (Product information)"Add a product entity reference field to any content type, referencing your simple product type. Set the widget to "Inline entity form - Complex". At admin/structure/types/manage/MY-CONTENT-TYPE/form-display I am checking both Allow users to add new product entities & Allow users to add existing product entitiesProblem/Motivation
When editing existing products and product information in the IEF and clicking Update Product, changes to the product are saved, but changes to the product variation are not saved.
If you take the IEF out of the equation by navigate to the product itself product/*/edit, you can modify the nested variation and the Save button updates the variation as it should.
If you edit and update the product variation in the IEF widget on the node by leaving the widget open and saving the node, it updates the variation as it should.
Comment #12
SilviuChingaru commentedI don't quite understand either but, as far as I understand, seems more related to #3271293: Changes are lost when collapsing a paragraphs subform including an inline_entity_form.
Can you please check if that patch on IEF module solves the problem?
Comment #13
nicolasgraph@SilviuChingaru, the patch you mentioned does not fix this issue.
@jsacksick, in my use case I reference a promotion in a custom entity (but the problem is the same if you try to reference a shipping promotion in a product for example). When using an ief widget, the promotion offer configuration and promotion conditions are not saved when using the ief submit before to submit the whole parent entity form. However, everything is right when saving directly the parent entity form.
Comment #14
jsacksick commentedI'm going to mark this as "won't fix" as we're trying to move away from the IEF module (which still doesn't have a stable release).
We're getting closer to that thanks to the new order items widget introduced in #3403314: Define a new widget to simplify adding products to orders from the edit page.