Problem/Motivation
Nodeblock adds its configuration in hook_node_load as an attribute of the node object. This allows other modules to apply additional functionality. However, this data currently only becomes available after the node has been saved. In my particular use case, an editor is allowed to configure parts of the block configuration from the node form. Nodeblock can facilitate saving this input by making the block delta, or machine_name, available on the node objects after it has been processed in nodeblock_node_insert/nodeblock_node_update.
Proposed resolution
Make nodeblock configuration available in the node object in hook_node_insert/hook_node_update after it has been processed.
Remaining tasks
- Write a patch
- Review
- Commit
User interface changes
None
API changes
Nodeblock configuration is available in the node object after nodeblock_node_insert/nodeblock_node_update has been processed.
Data model changes
Nodeblock configuration is available in the node object after nodeblock_node_insert/nodeblock_node_update has been processed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | nodeblock_add-nodeblock-config-in-hooks_2658812-2.patch | 960 bytes | idebr |
Comments
Comment #2
idebr commentedAttached patch makes the nodeblock configuration available on the node object after it has been processed in nodeblock_node_insert/nodeblock_node_update.
Comment #4
Johnny vd Laar commentedI've added your code + some fixes to the form because the #states where wrong.
Thank you for the patch.