Closed (fixed)
Project:
Inline Entity Form
Version:
8.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
18 Nov 2015 at 23:40 UTC
Updated:
28 Oct 2018 at 16:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
slashrsm commentedComment #3
webflo commentedSorry i have to retitle the issue. The Complex widget has the same issue.
Comment #4
dawehnerAlright
Comment #5
dawehnerThis makes #required just actually required together with #2626548: The static caching in \Drupal\Core\Entity\EntityTypeManagerInterface::getFormObject() is problematic
Comment #6
dawehnerSimple patch.
Comment #7
bojanz commentedWhy do we need #ief_element_validate if we have #element_validate?
Comment #8
dawehnerThat is a good point, I just haven't thought about that, nice, this removes a lot of the additional code.
Comment #9
dawehnerThis gives the same experience with nested IEF, still duplicate UUIDs.
Comment #10
bojanz commentedComment #12
slashrsm commentedI tested #9 on top of #2626970: Add testcase for nested inline entity form, which adds more tests. It seems that it introduces additional regressions as some of those tests failed with this patch (it created 3 uncomplete copies of entity in some cases).
I reverted one change and everything was green again. Used #2626548: The static caching in \Drupal\Core\Entity\EntityTypeManagerInterface::getFormObject() is problematic when doing that, which is RTBC and should go at least into 8.1.x (@catch agreed on that).
I also improved tests a bit more in this patch.
I'd propose the following:
1. We officially start requiring patch from #2626548: The static caching in \Drupal\Core\Entity\EntityTypeManagerInterface::getFormObject() is problematic as it fixes a lot of problems that we have.
2. We commit this patch and close this issue. I confirmed that using core fix and this patch fixes problem that summary describes.
3. We create as many tests as possible (includes #2639180: Inline entities are saved on AJAX validation and #2626970: Add testcase for nested inline entity form getting in).
4. We create separate ticket for each bug that we run into (already created #2649710: Required nested IEF forms don't work and #2649706: Double nested IEF can't be submitted if it's parent doesn't have required fields populated). We provide clear steps to reproduce and ideally write test case that demonstrates the problem.
This way it will be much easier to do a total refactoring of submit/validate part, which we need to do anyway.
@dawehner: Do you still remember what was the problem with duplicate UUIDs that you mentioned in #9?
Comment #13
slashrsm commentedAnother thing. @webflo should be mentioned in commit message as he significantly contributed to this issue.
Comment #15
slashrsm commentedThis fails since there is no core patch on testbot. Confirmed that locally.
Comment #16
bojanz commentedSounds like a plan. Committed #12.
Aaand forgot @webflo :( Sorry.
Comment #18
dawehnerNope, sorry ... all covered by a big layer of xmas sweeties.
Comment #20
geek-merlinLooks like we have the same over at media & paragraphs.