Closed (fixed)
Project:
ThemeKey
Version:
7.x-2.0
Component:
Code / API
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
8 Jun 2012 at 14:12 UTC
Updated:
26 Jul 2012 at 15:11 UTC
Hi,
After updating the node i am getting this error.
Notice: Undefined property: stdClass::$revision in themekey_ui_node_update() (line 328 of C:\xampp\htdocs\example\sites\all\modules\contrib\themekey\themekey_ui.module).
How do i fix this error
Please need help.
with thanks,
Comments
Comment #1
mkalkbrennerWhich Version of themekey was installed previously?
Comment #2
sakthiprogrammer commentedI used version 7.x-1.5 previously.
In that version i got same error and then I upgraded and checked, but again i got same error.
with thanks,
Comment #3
mkalkbrennerYou got this error in a previously working environment using 1.5 before you updated?
Comment #4
mkalkbrennerI had a look at the code. It's a harmless notice not an error. You can safely ignore it for the moment.
I'll fix it for the next release.
Comment #5
ayan_d commentedHere is a quick fix to be added in themekey_ui.module file
replace the line :
if (!$node->revision && 0 < db_select('themekey_ui_node_theme', 't')
with
if (!isset($node->revision) && 0 < db_select('themekey_ui_node_theme', 't')
Comment #6
mkalkbrennerfixed and committed to git.
quick fix in #5 is not 100% correct because it evaluates to TRUE if $node->revision is 0 or FALSE. That differs from the original code.
Comment #7
ayan_d commented@mkalkbrenner
Thanks for your update
we should then check
if ((!isset($node->revision) || !$node->revision) && 0 < db_select('themekey_ui_node_theme', 't')
Comment #8
mkalkbrenneryes, see http://drupalcode.org/project/themekey.git/blobdiff/2bd1644ebbc796c6552d...