Closed (fixed)
Project:
Node Hierarchy
Version:
7.x-2.x-dev
Component:
Drupal/PHP Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
25 Apr 2011 at 15:54 UTC
Updated:
4 Jan 2014 at 00:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jumpingship commentedOccured when creating new group content (Organic Groups). Are there any patches for this error?
Comment #2
lebachai commentedSame error, same version. Happened when attempting to use the module to assign multiple parents to a book page. Wondered if the problem was with the content type I was assigning it to?
Comment #3
BenPoole commentedSame error, same version. It happens to me when creating a basic page. Based on the previous two comments, it doesn't seem limited to any one content type. I also got a similar error earlier when trying to create a menu, so it seems related to this similar error: http://drupal.org/node/1143328.
Also, since I installed Node Hierarchy, I can't change the weights of my menu. In most cases, after saving, it simply doesn't implement the new order. If I try moving too many items around, then saving, I can get it to throw a 500 Internal Server error.
Comment #4
zarudnyi commentedSame here.
After saving new content I get error:
Notice: Undefined property: stdClass::$nodehierarchy_menu_links in _nodehierarchy_save_node() (line 714 of /sites/all/modules/nodehierarchy/nodehierarchy.module).
Comment #5
Tim Jones Toronto commentedI have the same problem on creating a Basic Page. Thanks.
Notice: Undefined property: stdClass::$nodehierarchy_menu_links in _nodehierarchy_save_node() (line 714 of C:\xampp\htdocs\sites\all\modules\nodehierarchy\nodehierarchy.module).Comment #6
TreyeDesigns commented.
Comment #7
TreyeDesigns commentedComment #8
MrPhilbert commentedSame here.
Disabling module till fixed.
Subscribing
Comment #9
MrPhilbert commentedDisabled Node Hierarchy Widgets and error is gone.
Comment #10
TreyeDesigns commentedI have removed it as well. I am using this module on other sites without this problem.
Also on the site I did get the error on I was not useing this Widget porition,
Comment #11
zarudnyi commentedComment #12
CreativeLlama commentedsubscribe
Comment #13
Courtney.B commentedSubscribe.
Comment #14
jvandooren commentedSubscribing...
To make the error disappear, I wrapped a temporary condition around the for loop (nodehierarchy.module line 710):
Just to be clear: this is not a fix, just getting rid of the annoying error message :-)
Comment #15
jvandooren commentedThe patch in #1168348: Warnings produced when creating nodes fixed this issue for me...
Comment #16
tevans commentedsubscribing
Comment #17
shaisamuel commentedJust had a similar error after applying the patch 1168348-4.patch at #15. The error message was:
Notice: Undefined property: stdClass::$nodehierarchy_menu_links in _nodehierarchy_save_node() (line 712 of /home1/myagelef/public_html/ecologicalintl/drupal/dev/sites/all/modules/nodehierarchy/nodehierarchy.module).
I then added a line like #14, to rep the internal of the function _nodehierarchy_save_node :
and the messages is gone. I am a newbe, and dont know much about how to write a patch, but this might be a code for a patch.
Comment #18
schnippy commentedHad the exact same error as shaisamuel at #14 and implemented the fix suggested but instead of bypassing the entire insert/update functionality if the variable is undefined, I went ahead and set it so the remaining functionality would work ex:
if (!isset($node->nodehierarchy_menu_links)) { $node->nodehierarchy_menu_links = array(); }Tested this on a number of edit / create situations and it is working for non-nodehierarchy and nodehierarchy nodes, on both edit and create with the attached patch.
Comment #19
lightjuice commentedThanks, this fix worked perfectly and hopefully the module will address this with the next update
Comment #20
ronan commentedI've put in the guard clause, but since there is no other functionality in that function if the array is empty I'm simply returning in that case rather than setting a default.