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

  1. Write a patch
  2. Review
  3. 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.

Comments

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new960 bytes

Attached patch makes the nodeblock configuration available on the node object after it has been processed in nodeblock_node_insert/nodeblock_node_update.

Johnny vd Laar’s picture

Status: Needs review » Fixed

I've added your code + some fixes to the form because the #states where wrong.

Thank you for the patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.