First, thanks for all your work for the community, Node Hierarchy's a very valuable tool.

Although I've created most of the content for my site using NH, I only recently started using core Upload module to attach files, and as soon as I did I started getting the below error messages right after I press Submit for a node with attachments, whether a new item or edited. I hadn't use NH in relation to these nodes, they're just "behind the scene" containers for files at the moment and the nodes probably won't ever be viewed by visitors directly. Also note the errors go away on refresh, and in looking at the database, everything seems (from my limited knowledge POV) to be OK, and so far no functional problems either.

It took a while for me to isolate Node Hierarchy as the culprit - or rather, the error messages stop when it's disabled.

I do like its functionality, so I'll try to make time to find out specifically what other module it might be conflicting with, or if it even actually matters to the end result (I'm going to be the only user uploading files for the moment) but in the meantime here's the test of the errors just in case something looks obvious.

I hate to try the dev version, as it's for a (soon to be) production site, unless you both think it will solve the problem AND let me know it's unlikely to cause problems.

Thanks in advance

* warning: Invalid argument supplied for foreach() in X:\xampp\drupal510\modules\node\node.module on line 561.

* warning: implode() [function.implode]: Invalid arguments passed in X:\xampp\drupal510\modules\node\node.module on line 565.

* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM shared_node n INNER JOIN shared_users u ON u.uid = n.uid INNER JOIN shared_node_revisions r ON r.vid = n.vid WHERE in X:\xampp\drupal510\includes\database.mysql.inc on line 172.

Here's a dump of my installed modules list:

Drupal 5.10
Includes: Upload, System, Filter, Node, Help, Block, Contact, Path, Watchdog, Menu, Search, Taxonomy, User

Drupal Administration Menu 5.x-2.6
Includes: Administration Menu

Administration Menu Dropdown 5.x-1.5
Includes: Administration Menu Dropdown

Devel 5.x-0.4
Includes: Devel

Image 5.x-2.x-dev (2008-Aug-17)
Includes: Image Attach, Image Import, Image

ImageAPI 5.x-1.2
Includes: ImageAPI, ImageAPI GD2

ImageCache 5.x-2.x-dev (2008-Jul-24)
Includes: ImageCache, ImageCache 4 Image, Imagecache UI

Image Assist 5.x-1.6
Includes: Image assist

Menu Trim 5.x-1.0
Includes: Menu Trim

Node Hierarchy 5.x-1.1
Includes: Node Hierarchy

Path Redirect 5.x-1.2
Includes: Path Redirect

Pathauto 5.x-2.3
Includes: Pathauto

Taxonomy context 5.x-1.0
Includes: Taxonomy context

Taxonomy Multi Editor 5.x-1.0
Includes: Taxonomy Multi Editor

Taxonomy Node Operations 5.x-1.1
Includes: Taxonomy Node Operations

Theme Settings API 5.x-2.8
Includes: Theme Settings API

Token 5.x-1.11
Includes: Token

Update Status 5.x-2.3
Includes: Update status

Upload previews 5.x-1.2
Includes: Upload preview

Upload path 5.x-1.1
Includes: Upload path

Views 5.x-1.6

Comments

HansBKK’s picture

Sorry, forgot to mention

Drupal v5.10
PHP v5.2.6
MySQL v5.0.51b

ronan’s picture

Thanks for all the great info. I'm going to try and reproduce your setup as best I can and see if I can reproduce the issue.

I'll post here with what I find

R

HansBKK’s picture

Thanks Ronan.

I'm also keeping the whole XAMPP stack under Subversion control - sometimes a module will throw "permission denied" error messages when SVN's hidden tracking folder won't let it rmdir do it's stuff; doesn't look relevant to me, but just in case FYI. . .

HansBKK’s picture

I set up a scratch site and disabled ALL contrib modules other than NH and Upload Path (plus Token which it depends on)

Same error message.

Next test when I have time - does it actually make any difference to the end result in the database?

pablo demono’s picture

I've got the same problem (drupal 5.7, node hierarchy 5.x-1.1)

    * warning: Invalid argument supplied for foreach() in /home/cdgpolska/ftp/drupal5/modules/node/node.module on line 521.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/cdgpolska/ftp/drupal5/modules/node/node.module on line 525.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/cdgpolska/ftp/drupal5/includes/database.mysql.inc on line 172.
pablo demono’s picture

Warning appears only if you create/edit non node hierarchy content type

HansBKK’s picture

Are you using Upload Path?

pablo demono’s picture

>Are you using Upload Path?

no, never

Upload (core 5.7), Upload Image 5.x-1.1, Comment Upload 5.x-0.1
Automatic Nodetitles 5.x-1.1, Content Construction Kit (CCK) 5.x-1.9, Node Family 5.x-1.4, Node Profile 5.x-1.4, Usernode 5.x-1.4,

HansBKK’s picture

New wrinkle - I just discovered that ALL the files table links got wiped for ALL my uploads.

The nodes still list the files, but the path points to the files directory only because the relevant fid rows are empty/null/0.

I hadn't looked at them since I uploaded the same file set with Image Import and then Imagefield (yes doing a lot of testing) so I don't know who the culprit is.

I doubt it's NH, but perhaps the error messages I was getting were related somehow?

Do your message go away when you disable NH (as mine do)?

HansBKK’s picture

bumpity

dgorton’s picture

Status: Active » Closed (fixed)

Closing as this is a very old issue w/ very old code. Believe this is long since fixed - please reopen if not.