- πΊπΈUnited States smustgrave
Wonder if this is a valid task for node in D10?
I submit this patch strictly from a recent experience I had when I was trying to make use of the $reset parameter. In my case, I was writing an import script where lines of CSV were being parsed from a file. Each line of CSV had the potential to alter the taxonomy of an existing node. With the data we were getting for this import script, multiple lines in the data were adding to the taxonomy of an existing node. Keeping this in mind, I would call node_load($nid, NULL, TRUE), where the 'TRUE' in the call was the $reset parameter (this loaded node would be saved at the end of the loop). Unfortunately, I discovered, the node_invoke_nodeapi() and node_invoke() functions did not pass the $reset parameter to the node hooks. In my case, this was a problem, because taxonomy_nodeapi() relies on (in a helper function) a php static array when loading the taxonomy for a node. Of course, if the taxonomy of a node has changed during the execution of a script, a later loading would only return the first array of taxonomy terms loaded for the node, in spite of the $reset parameter being set to TRUE.
Of course, for this patch to be useful, other core modules will need to make use of the $revision and $reset parameters in their node hooks. I am willing to submit patches to this end if this one is accepted.
I also argue that this is the way to go just to make the loading function consistent across the hooks.
-Ankur
Postponed: needs info
9.5
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Wonder if this is a valid task for node in D10?