Blocks can't be disabled, this module does not work
colincalnan - August 25, 2009 - 22:25
| Project: | Node As Block |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | colincalnan |
| Status: | patch (to be ported) |
Description
This module does not work for Drupal 6.
I've reviewed the code and this module does not work properly.
1. When you choose to set a node as block, it sets the status field in the blocks table to 0, it should be 1, a major problem, basically the block never appears !
2. When you choose to turn off the node as block it does not set the status field back to 0, so you basically can't undo creating the block.
If i had the time right now I'd help fix it but I need this working and have no budget left on this project.
Can you please fix it.
I've tried the other patches, and the beta version and nothing works.

#1
I have created a patch that first sets the status to 1 so that it can apply that to the block when you first create the node in _nodeasblock_node_form(). This means that the block is visible when it's supposed to be.
Then I modified the update hook in nodeasblock_nodeapi(), so that if the user has chosen to disable the block, it is removed from the block table as it should be.
This patch is against 6.x-1.x-dev.