Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By coldfly on
I have often received the php errors like this, I don't know if it is a bug or setting error.
also I found that when you visit http://www.eefan.net/book/export/html/misc/print.css in the browser and then visit the frontpage http://www.eefan.net/ and these errors come up.
Location http://www.eefan.net/book/export/html/misc/print.css
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 /domains/eefan.net/public_html/includes/database.mysql.inc on line 172
Invalid argument supplied for foreach() in /domains/eefan.net/public_html/modules/node/node.module on line 521
implode() [<a href='function.implode'>function.implode</a>]: Bad arguments. in /domains/eefan.net/public_html/modules/node/node.module on line 525
Comments
Is there anyone who has the
Is there anyone who has the same error with me?
just got a similaar message
will let you know if I find anything in my bug checking.
here are the modules which i
here are the modules which i use in the site, they are all official release, i hope it can help
auditfiles
blogger
buddylist
google_analytics
gsitemap
image
invite
og
panels
pathauto
poormanscron
privatemsg
tinymce
views
my server info Apache
my server info
Apache 2.2.4
MySQL 5.0.41
The same error with me
I've noticed the same error today.
In fact, there were 3 separate errors logged, which are related to a
/book/export/html/misc/print.css
display (as above, just different order):
1.
Invalid argument supplied for foreach() in /modules/node/node.module on line 521.
2.
implode() [function.implode]: Bad arguments. in /modules/node/node.module on line 525.
3.
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 /includes/database.mysql.inc on line 172.
(I've skipped the site / file location part...)
I am sure it is introduced with 5.2 version of Drupal, as I didn't notice such errors with 5.1 before.
I think I've found the reason
I believe the problem is that some other (past) version improperly used /misc/print.css address as above. Now in 5.2, since there is nothing at this address, those errors came up (if someone / something uses the old URL; the new printer friendly page display of a book does not generate those errors, so I presume a css is fetched from some other - probably the right one - address).
I believe I've resolved the problem creating a 301 redirect from /book/export/html/misc/print.css to /misc/print.css (using a great Path Redirect module, which I find extremely useful to resolv the obsolete URLs problems).
I'm getting the same exact error...
I'm getting the same errors, only when I click on any forum (except OG created forums). No other place. I do not have the book module installed. I don't know what I should create a redirect from in order to use your resolution. The only content type that appears to be affected are forum topics. Any ideas what I should do?
Hi SombodySysop, I'm also
Hi SombodySysop,
I'm also getting these errors on forums... did you solve the problem?
Regards,
capdog
No resolution at all!
Need help!
I just updated my site to 5.5 and the errors still occur. The only thing I know for sure is that the error does NOT occur with forums created by og_forum. Help!
Quick fix
Just a quick dirty fix:
Open the /modules/node/node.module, goto line# 521
//* Line#521, insert below four lines:
$cond = array();
if( $param==null || !is_array($param) ){
return null;
}
// */
foreach ($param as $key => $value) {
$cond[] = 'n.'. db_escape_string($key) ." = '%s'";
$arguments[] = $value;
}
$cond = implode(' AND ', $cond);
OG User Roles Issue
If you are using OG User Roles, I have resolved this issue here: http://drupal.org/node/194214
Thanks for the help!
Here are some notes I received from the Developer list:
Thanks, yes I traced the
Thanks, yes I traced the issue to OG User Roles.
Thanks I'll install the updated module.
Cheers
Mark
Module not yet updated, only patch available
OGR Release 2.6 (the latest) does not contain this modification. You'll have to apply the patch in the link I supplied above. These changes will be incorporated in the new version. Thanks!
I hate to hack core, but
I hate to hack core, but spent hours looking in the forums for an answer. This is the only fix that will help.
I'm getting these errors and no telling what's causing them?
Anyway, thanks - hope this can get resolved soon - but in the meantime this fix seems to be working.
(i'm using core 5.7 by the way).
Scott Rigby
http://basekamp.com
http://PlausibleArtworlds.org
Scott Rigby
http://basekamp.com
http://PlausibleArtworlds.org
http://UtopiaSchool.org
As a patch
I'm not 100% that this solved my problem, but I think it might. Here it is as a patch. Use it at your own risk (really).
http://www.neopoet.net/node-164499-0.patch
The patch gives me this
The patch gives me this error:
-----------------------------
Subir Ghosh
www.subirghosh.in
calling variables that don't exist!
I get this problem all the time...and it's whenever I'm messing with CCK fields and templating. For instance, if you create a field for a CCK type and then story its value to a variable in your template. Then at some point later you delete that field from the CCK type but keep calling it in your template....FAIL. You get the errors seen here.
Subscribing, may be
Subscribing, may be duplicate of each other: www.drupal.org/node/142286. Greetings, Martijn