I'm attaching a simple patch that increases the block weight range ("delta") from -10/+10 to -100/+100.

This is necessary to keep nodeasblock blocks from "falling out of place" and appearing lower or higher in a region after a user edits the node.

The "falling out of place" happens because Drupal's block admin panel might assign weights outside the -10/+10 range to nodeasblock blocks -- e.g., a block might get assigned a weight of -57. Yet, when the block is edited, the nodeasblock module will rest the block weight to its maximum of -10.

The patch sets the delta to -100/+100, which has been sufficient to handle sites with LOTS of blocks in my case. Of course, an ideal situation would be to have the nodeasblock module calculate the maximum block range based on the blocks that already exist, but that might not be easy to do nor smart for performance.

Comments

superstar’s picture

Status: Active » Needs work

This is definitely needed!

Can you please re-roll the patch to include the same delta entry for thenodeasblock_default_weight within nodeasblock_form_node_type_form_alter?

Thanks

andrechun’s picture

StatusFileSize
new800 bytes
osman’s picture

Status: Needs work » Needs review
StatusFileSize
new1.15 KB

re-rolling the patch against 6.x-1.x-dev (February 24, 2011)