Closed (outdated)
Project:
Drupal core
Version:
9.3.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Apr 2012 at 20:15 UTC
Updated:
19 Apr 2022 at 07:08 UTC
Jump to comment: Most recent
Comments
Comment #1
jhodgdonLooks good! I'll get this committed probably tomorrow, when I get back to my main computer. Thanks!
Comment #2
catchIt should be passed by value though. The entity objects themselves are passed as resources, but we don't want people to be able to actually remove or add items from the array in this hook. We should probably switch back to straight module_invoke_all() when invoking the hook.
Comment #3
tim.plunkettFrom my conversation earlier today with merlinofchaos, I was under the impression that http://drupal.org/project/ers depended on hook_entity_load passing the array by reference, and both it and panelizer document their implementation as such.
Comment #4
merlinofchaos commentedBecause Field API is totally broken, ERS actually does, in fact, rely on exactly that ability so that it can control which revision of the entity is in use based upon the context.
Comment #5
tim.plunkettDoesn't matter because of how objects work.
Comment #6
jhodgdonUm. It's an array being passed by reference/value, not a single object. Arrays do matter whether passed by ref/value, even if objects don't. And I believe #4 implies they would want to load a different revision of the entity and replace what's in the array?
Comment #13
joachim commentedThis is possibly made obsolete by #2928888: Add a hook_entity_preload() for modules that need to load a different revision than the default one?
Comment #18
quietone commentedThe doc block in question here was updated in a later issue, #597236: Add entity caching to core, which has plenty of discussion.
Therefore, closing as outdated. If this is incorrect reopen the issue, by setting the status to 'Active', and add a comment explaining what still needs to be done.
Thanks!