Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
(Note: This is related to #1978258: Stops inserting until Class Registry cache cleared. This post is a request for further information to help me figure out the cause of that problem.)
On a site with Nodeblock installed, I'm trying to use Insert Block to insert a Quicktab block. This works fine for a period of time; eventually the block stops including and the following errors are displayed:
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 537 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 542 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 547 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 557 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 537 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 542 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 547 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 557 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 537 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 542 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 547 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 557 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 537 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 542 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 547 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Notice: Undefined property: stdClass::$nodeblock in nodeblock_block_view() (line 557 of /home/coolbean/public_html/_dev/sites/all/modules/nodeblock/nodeblock.module).
Can someone help me understand what would cause those errors to be displayed?
Salient facts:
- The page does include 3 nodeblocks, but they are displayed successfully. (QuickTabs is doesn't have any interplay with nodeblock that I'm aware of.)
- Errors and failure behavior are observed while logged-in.
- The errors go away and Insert Block functions properly when the Class Registry cache is cleared.
Comment | File | Size | Author |
---|---|---|---|
#6 | nodeblock-1978630-6.patch | 1.97 KB | claudiu.cristea |
#5 | nodeblock-1978630-5.patch | 785 bytes | claudiu.cristea |
Comments
Comment #1
escoles CreditAttribution: escoles commentedChanging the issue from 'support' to 'bug' because this represents a deeper and more extensive problem than I originally thought; also, I'm now pretty sure this is a nodeblock issue, not a node_insert issue, and that if it's a configuration problem it's associated specifically with nodeblock 7.x-1.3.
What's happening now is that the content, and only the content, of all nodeblocks is disappearing from regions where they're included. (The containers for the nodeblocks are still being written to the regions, just with no content.)
This happens after a few hours, and the temporary fix is to clear the class registry cache. The behavior of the issue changed from just blocks included via filter to blocks in regions after I created a new nodeblock and included it in a region. (The block was a simple text block displaying a simple IMG tag.) (Note: the behavior change was NOT driven by disabling insert_block, but it does persist now that insert_block has been disabled.)
Right now I'm running this system in parallel with a production system which has a nearly identical configuration. Production is NOT experiencing this issue.
The only relevant difference as far as I can see is in the version of Nodeblock installed: The production version is running Nodeblock 7.x-1.2; dev is running Nodeblock 7.x-1.3.
Comment #2
escoles CreditAttribution: escoles commentedRolling back to nodeblock-7.x-1.2 has eliminated the behavior. So this seems to be an issue with nodeblock-7.x-1.2.
Comment #3
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedNodeblock 7.x-1.3 included a new nodeblock table which is added with this update hook: nodeblock_update_7102
did you run update.php after updating? can you verify whether the nodeblock table exists and that your nodes are added there?
Comment #4
escoles CreditAttribution: escoles commentedThe nodeblock table definitely existed. Here's the SQL for it:
Comment #5
claudiu.cristea->fetchCol()
returns an array of items from the first column. Even it's a single row will returnarray($nid)
instead of$nid
.->fetchField()
is the correct answer here. See https://drupal.org/node/1251174.Comment #6
claudiu.cristeaFixing all occurrences.
Comment #7
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedFetch column returns only one column of the next row in the result set. So I don't think it ever returns an array. I also don't think that this patch solves this issue as all changes are on node update and this seems to be a node display problem.
escoles can you check if the nodeblock config of these nodes are written into the table?
I've added a little change here:
http://drupalcode.org/project/nodeblock.git/blobdiff/6c286f2a403afa82652...
which should prevent the notices from showing up but I assume that the nodeblocks are not displaying after this fix.
Comment #8
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedComment #9
Johnny vd Laar CreditAttribution: Johnny vd Laar commented