Saving (and previewing) blocks with required contexts isn't currently working.
To reproduce:
- Panelizer the default view mode on some content type
- Visit a node page of that type
- Try to place an "Title" block (in the "Content" category)
- If you open the web developer tools and look at what was returned via AJAX, it's:
{"message":"A fatal error occurred: Required contexts without a value: entity."}
Basically, what appears to be happening is that we're not saving the the context mapping for the block, and we're attempting to map the contexts before the configuration is applied (which is what should set the context mapping).
Working on a patch to fix now!
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff.txt | 653 bytes | dsnopek |
| #5 | panels-ipe-context-blocks-2665332-5.patch | 5.07 KB | dsnopek |
Comments
Comment #2
dsnopekI have a patch that fixes this for Panelizer, but actually not the Page Manager example in the issue summary. :-/ I believe that is still broken by #2636472: Load context for page that IPE is editing, rather than AJAX or form route
So, I'll update the issue summary to use Panelizer, because this fixes a legitimate issues.
Comment #3
dsnopekComment #4
phenaproximaIt should be BlockPluginInterface, not BlockPLuginInterface. The nittiest of nitpicks.
Other than that, this patch makes good sense to me.
Comment #5
dsnopekThanks for the review! Here's a patch that fixes the type-o.
Comment #7
japerryFixed!
Comment #8
dsnopekWoohoo, thanks!
Comment #11
dsnopek