Problem/Motivation
Steps to reproduce
- On a fresh standard install of Drupal, enable the forum module.
- Post a forum topic at
node/add/forum. - Go to
admin/contentand unpublish the node.
Result
You will receive an error:
Notice: Undefined property: stdClass::$shadow in forum_node_update() (line 373 of /.../modules/forum/forum.module)
The property is being checked with if ($node->shadow), but it may not be set at all.
Proposed resolution
Use if (!empty($node->shadow)) instead of if ($node->shadow). Patch in #1 implements this change.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Original report by @kerala
" Notice: Undefined property: stdClass::$shadow in forum_node_update() (line 373 of C:\wamp\www\D-7.7\modules\forum\forum.module) "
I downloaded drupal 7.7 and installed a fresh copy on my localhost and I posted a forum topic.When i unpuplished the post going to home » Administration » content i got the above error message.(I did'nt install any contributed modules)
I am getting this error whenever i try to "publish or unpublish" a forum post from home » Administration » content section..
i got the same error message for my drupal 7.2 and 7.4 sites also..
Any idea?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | undefined_property_shadow-1234316-1.patch | 485 bytes | agi.novanta |
Comments
Comment #1
agi.novanta commentedI think is just missing an
empty()on line 374.There is the same bug on 8.x.
Comment #2
popzkg commentedIs this a serious bug? mine is a production site.will this bug cause anything wrong for my site?and actually i dont know how to apply the patches..
Comment #3
marcingy commentedReseting title
Comment #4
marcingy commentedLooks good - assuming it goes green.
Comment #5
xjm#2 It won't affect your site's functionality, so you are safe to wait until this is in a release.
Comment #5.0
xjma small change..
Comment #6
xjmAdded issue summary.
Comment #6.0
xjmUpdated issue summary.
Comment #7
dries commentedCommitted to 7.x and 8.x. Thanks.
Comment #8
BeaPower commentedI am also having this problem with views bulk operations, was this fix applied to the next release of the module?
Comment #9
larowlanBeaPower this has been applied to 7.x branch which will most likely see a point release at the end of August
Comment #10.0
xjmUpdated issue summary.