dbolinovski found this out while writing the tests, I confirmed it:

1) Create a field_page on the Article content type, have it use the simple widget to create/edit a single page.
2) Create an article, fill out the page values.
3) A page will be created with the article values. No article will be created.

Might be caused by one of the recent fixes.

Comments

bojanz created an issue. See original summary.

slashrsm’s picture

Issue tags: +D8Media
webflo’s picture

Title: The simple widget is completely broken » IEF Widgets are completely broken
Issue tags: +Zurich media sprint 2015

Sorry i have to retitle the issue. The Complex widget has the same issue.

dawehner’s picture

Assigned: Unassigned » dawehner

Alright

dawehner’s picture

StatusFileSize
new5.75 KB
dawehner’s picture

StatusFileSize
new12.47 KB

Simple patch.

bojanz’s picture

Why do we need #ief_element_validate if we have #element_validate?

dawehner’s picture

That is a good point, I just haven't thought about that, nice, this removes a lot of the additional code.

dawehner’s picture

StatusFileSize
new5.58 KB
new8.38 KB

This gives the same experience with nested IEF, still duplicate UUIDs.

bojanz’s picture

Status: Active » Needs review

The last submitted patch, 6: 2618502-6.patch, failed testing.

slashrsm’s picture

StatusFileSize
new8.86 KB
new8.13 KB

I 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?

slashrsm’s picture

Another thing. @webflo should be mentioned in commit message as he significantly contributed to this issue.

Status: Needs review » Needs work

The last submitted patch, 12: 2618502_12.patch, failed testing.

slashrsm’s picture

This fails since there is no core patch on testbot. Confirmed that locally.

bojanz’s picture

Status: Needs work » Fixed

Sounds like a plan. Committed #12.

Aaand forgot @webflo :( Sorry.

  • bojanz committed d768682 on 8.x-1.x authored by slashrsm
    Issue #2618502 by dawehner, slashrsm: IEF Widgets are completely broken
    
dawehner’s picture

@dawehner: Do you still remember what was the problem with duplicate UUIDs that you mentioned in #9?

Nope, sorry ... all covered by a big layer of xmas sweeties.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

geek-merlin’s picture

Looks like we have the same over at media & paragraphs.