Support from Acquia helps fund testing for Drupal Acquia logo

Comments

KarlShea created an issue. See original summary.

tedbow’s picture

Status: Active » Needs review
FileSize
1.18 KB

Here is a patch that fixes the error by calling but I would think it should be fixed in #2798261: Using $form_state->getValue() in BlockBase's blockForm throws "subform and parent form must contain the #parents property" exception.

I have not read up much on the SubFormState so likely this is the wrong way to solve it but it does work.

KarlShea’s picture

According to #2798261-11: Using $form_state->getValue() in BlockBase's blockForm throws "subform and parent form must contain the #parents property" exception that's the way to do it—and it fixes it for me—but I still think someone that really knows how those SubFormState changes are supposed to work should weigh in.

mherchel’s picture

FYI, the patch in #2 fixed it for me.

EclipseGc’s picture

Status: Needs review » Postponed (maintainer needs more info)

So... this was annoying. I attempted to fix this in core, we'll see if my suggestion is worthwhile over on the other issue, otherwise we may adopt this patch shortly just as a stop-gap.

Eclipse

KarlShea’s picture

As suggested in #2798261-32: Using $form_state->getValue() in BlockBase's blockForm throws "subform and parent form must contain the #parents property" exception, is there a reason that the form state input is needed at all here? It looks like changing #default_value to just use what's in $config works just fine.

KarlShea’s picture

Status: Postponed (maintainer needs more info) » Needs review
japerry’s picture

DamienMcKenna’s picture

  • tim.plunkett committed 678c053 on 8.x-3.x authored by KarlShea
    Issue #2800951 by KarlShea, tedbow: EntityField block broken due to...
tim.plunkett’s picture

Status: Needs review » Fixed

Reviewed this in person with @EclipseGc, committed!
Thanks @KarlShea

Status: Fixed » Closed (fixed)

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