This is blocking #2844054: Inline Revisionable Content Blocks.
At the moment it's impossible to use IPE to create or edit blocks which use an inline entity form in their configuration. This is because IEF needs to hook itself into a submit button, but Panels IPE's block plugin form defines both the submit and preview buttons as normal buttons, not submit buttons, and therefore they will not execute any submit callbacks. Which means they will completely bypass any kind of IEF stuff.
The solution here, as I discussed yesterday with @EclipseGc and @samuel.mortenson, is to split the submitForm() method into two methods -- the actual submit function that saves the data, and the AJAX callback which prepares and returns the response content. We proved in manual testing that this will allow IEF to run as and when it should, while the AJAX functionality will continue to work the way it should.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | panels-n2854542-6.interdiff.txt | 1.65 KB | damienmckenna |
| #6 | panels-n2854542-6.patch | 3 KB | damienmckenna |
Comments
Comment #2
phenaproximaComment #3
damienmckennaLets put this in beta7 so #2844054 can be added to CTools.
Comment #4
eclipsegc commentedOk, this patch is officially dependent on [##2844054] now. I could break out the part of that patch this depends on though if we want to move forward with this faster.
I'm introducing a new service to ctools that allows a tempstore to be serializable. Updated PanelsIPEBlockPluginForm to use this new service. This allows our wizarded steps to continue working when core uploads an imagefield in the middle of our process which is necessary for inline blocks.
Eclipse
Comment #6
damienmckennaThe tempstorage service was moved into #2858103: Add serializable tempstore service (extracted from #2844054), so that's now what's required.
This adds some extra comments.
Comment #8
damienmckennaSo #2858103: Add serializable tempstore service (extracted from #2844054) is in, lets test this again.
Comment #9
samuel.mortensonI reviewed the Panels codebase and we use the "user.shared_tempstore" service in a number of locations. Do we need to change it everywhere, and if not why does this form in particular need the change?
Comment #10
tim.plunketta) The "new" tempstore has a one line addition to the core one. It should have an @todo referencing a core issue to simply add that one line.
b) From my understanding, this would be a rare class to swap out, and would be reasonable for CTools to do so. Then the service name wouldn't need to be changed.
c) If that's too much to ask, the service could be decorated
Comment #11
timodwhit commentedComment #12
timodwhit commentedIt appears this patch will need a reroll, and an update for 8.x-4.x, bumping version and status.
Also, I believe this change would be needed for PanelsIPEBlockContentForm as well.