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.
Hello,
On my site I get several notices when I use context:
Notice : Undefined property: stdClass::$content in _block_get_renderable_array()...
I have tried many solutions without success:
https://www.drupal.org/node/1306172#comment-10265695
https://www.drupal.org/node/2107877
...
Is there a method for debug these notices and resolve these messages?
Thanks for your help.
Comments
Comment #2
kumkum29 CreditAttribution: kumkum29 commentedSometimes in my region some blocks are empty. The notices come from the empty blocks?
Is there a solution for not rendering a block if it is empty?
Here is my code to generate my region in the template.php:
Here is my code in my node.tpl:
Thanks.
Comment #3
jief CreditAttribution: jief commentedI fix the same problem by adding
drupal_static_reset('context_reaction_block_list');
after$variables['myregion'] = $plugin->block_get_blocks_by_region('myregion');
so
Comment #4
paulocsHi @kumkum29,
Maybe to late, but did you solve your problem with comment #3?
If you still have problem please reopen the issue.
Comment #5
paulocsComment #6
paulocsComment #7
paulocs