Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Aug 2012 at 01:23 UTC
Updated:
6 May 2025 at 10:49 UTC
Jump to comment: Most recent
Comments
Comment #1
fagoRight now the controller gets into $form when it is assigned as callback, e.g. when assigned as #submit handler. Then it also in $form_state['controller'], however both arrays get serialized independently of each other, what means we'll get two controller instances after cache retrieveal.
That's something we want to fix. Right now, this is no problem as the controller contains no state though, but that might change.
Comment #2
sunHm. I don't quite get it.
Why do we store the controller in $form?
It looks like we could simply replace that?
For a #cache'd form, the callback is not re-invoked on subsequent requests. For non-#cache'd forms it is.
To me this actually looks like as if $controller should be a $factory here...?
Comment #3
fagoThe controller also adds itself to button handles, e.g. $form['button']['#submit'] which are executed on cached forms.
Comment #16
smustgrave commentedWonder if this is still an issue or a way to verify?
Comment #18
quietone commentedThere has been no work on this task for 13 years. It is likely that it is no longer needed or has been implemented. Therefor, closing.
If there is work to do here, then either re-open the issue and add a comment or open a new issue and reference this one.