Closed (fixed)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Flag core
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2013 at 18:45 UTC
Updated:
3 Mar 2013 at 09:50 UTC
Jump to comment: Most recent file
flag has a convenient way of avoiding node_load during 'insert', but flag_flag_access is not using it unlike flag_flag so node_load gets called while the node is being inserted and has $node->flags populated.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | flag-flag_entity-1896854-4.patch | 571 bytes | hefox |
| flag_fetch_content.patch | 576 bytes | hefox |
Comments
Comment #1
socketwench commentedIt looks good to me.
Comment #2
joachim commentedDoes need to be fixed on 7x3x first?
Comment #3
joachim commentedComment #4
hefox commentedComment #5
joachim commentedAre we certain at this point that the entity has been remembered in the flag entity cache?
Comment #6
hefox commentedIt doesn't really matter -- it falls back to node_load.
However, no, not initially in 7.x-3.x due to flag field attach save being called before flag_node_save and flag field attach not calling remember content like flag_node_save does as addressed in latest patch in #1064472: separate fields from field instances
Comment #7
joachim commentedThat makes sense. (The flag internal cache is one of those parts of this module I'm not yet really familiar with :)
Committed.
git commit -m "Issue #1896854 by hefox: Changed flag_flag_access() to use flag->fetch_content() cache." --author="hefox "