Problem/Motivation

When referencing a Block plugin, the configuration is not saved. This is because of #2536646: [meta] PluginFormInterface implementations assume they are top-level and more specifically #2532968: Block plugin forms assume they are top-level. Until these patches are committed to core though; this module is somewhat useless for this purpose. :(

Proposed resolution

Explore a work-around solution to this problem. Perhaps we could override the service and extend the class? Or is this impossible?

Or could we open the form in a modal or something so it's not an embedded form?

Alternatively, it would be nice to have a patch (or a series of patches) that could be applied to core that would fix the issue.

Remaining tasks

  1. Research a suitable workaround
  2. Write patch

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

davidwbarratt created an issue. See original summary.

davidwbarratt’s picture

Title: Workaround for Saving Block config » Workaround for saving Block config
davidwbarratt’s picture

Issue summary: View changes
Xano’s picture

At this point there's nothing we can do, but fix this in core. Otherwise we'd have to add all kinds of one-off workarounds for specific plugins not handling their forms the right way.

Xano’s picture

Status: Active » Closed (won't fix)

#2537732: PluginFormInterface must have access to the complete $form_state (introduce SubFormState for embedded forms) provides what is possibly the best fix to the problem right now. Please help review and write tests for the patch in there.

Xano’s picture

Status: Closed (won't fix) » Closed (duplicate)
davidwbarratt’s picture

#6,

I applied that patch and it didn't fix my problem; which is why I created this issue. Is there something else that needs to be applied or did it just not work?

Xano’s picture

Then that's a problem with the patch, which needs to be discussed in the other issue.

davidwbarratt’s picture

Awesome, thanks; I'll leave my feedback there then. :)