Needs review
Project:
Node Hierarchy
Version:
6.x-1.4
Component:
Drupal/PHP Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2008 at 18:59 UTC
Updated:
1 Jun 2011 at 03:08 UTC
Jump to comment: Most recent file
Comments
Comment #1
TechMosaic commentedI am seeing a similar issue.
This was on a view and node hierarchy config that was working on drupal 6.3...but when I upgraded, I see this error.
I tried upgrading and downgrading the views and node hierarchy modules, but to no avail.
Any ideas on how to clear this up?
Comment #2
TechMosaic commentedJust realized this is related to this post:
http://drupal.org/node/309272
Reverting to views rc1 resolves the issue.
Sorry for proliferating
Comment #3
usapmaster commentedI am having the same problem. any solution to this? I upgrade views to rc4 but still having the same problem. It was working prior to upgrade from rc1 rc3. where can i find rc1 so i can revert back? I did not back up since my site is still not up.
warning: Invalid argument supplied for foreach() in /home/mysite/public_html/modules/views/plugins/views_plugin_display.inc on line 509.
Comment #4
ronan commentedComment #6
keva commentedI upgraded to D6.9, and just started to use NH 6.x-1.1 and Views 6.x-2-2.
Similar error messages as the OP's are being generated:
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /sites/all/modules/nodehierarchy/nodehierarchy_views/nodehierarchy_views.module on line 117.
* warning: Invalid argument supplied for foreach() in /sites/all/modules/views/plugins/views_plugin_display.inc on line 509.
Comment #7
keva commentedComment #8
beckyjohnson commentedI too am now getting this issue:
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/vhosts/myurl.org/httpdocs/sites/all/modules/nodehierarchy/nodehierarchy_views/nodehierarchy_views.module on line 151.
warning: Invalid argument supplied for foreach() in /var/www/vhosts/myurl.org/httpdocs/sites/all/modules/views/plugins/views_plugin_display.inc on line 547.
I do not want to downgrade to an older version of view to fix this though. I have this version of views: 6.x-2.6
Becky
Comment #9
crozilla commentedGetting same error with Node Hierarchy 6.x-1.2
Comment #10
anybodyHello!
I had the same problem and fixed it by changing line 134 in nodehierarchy_views.module:
if ((!$first_arg || ($first_arg['field'] !== "parent" && $first_arg['field'] !== "antecedent") || $first_arg['table'] !== "nodehierarchy") and is_array($view->display['default']->display_options['arguments'])) {
Added "and is_array($view->display['default']->display_options['arguments']" and brackets at the end of the check.
This seems to be a simple, but working fix with no dangerous results.
Comment #11
Gabriel R. commentedI confirm that the solution in comment #10 works. Thanks, Anybody!
Comment #12
deruitern commentedThis is still a bug in nodehierarchy 1.3. Anybodys solution from #10, still worked for me, but the line number is now 136.
Comment #13
pdbob commentedJust to confirm, the final line 136 should look like this-
if ((!$first_arg || ($first_arg['field'] !== "parent" && $first_arg['field'] !== "antecedent") || $first_arg['table'] !== "nodehierarchy") and is_array($view->display['default']->display_options['arguments'])) {
Is that right?
The error went away and everything seems to be fine
Comment #14
deruitern commentedSame bug exists in nodehierarchy 1.4. I'm using the lastest version of views, currently 6.x-2.12. Same solution as #10 from above, but the line number is 135.
Comment #15
jbylsma commentedI took a look into this today. I was able to reproduce the behavior if I created a view that didn't have any arguments. Funny thing was that I could disable it if I added an argument to said view, saved it, then deleted the argument and resaved. Any which way, as opposed to the previously mentioned patches, I've added logic to populate an array for arguments if one doesn't exist. I realize that this is a pretty old issue, but could some eyeballs take a look at this before I commit it to 6.x-1.x-dev? I've made the patch based on 6.x-1.4. Thanks!