I just installed gsitemap (4.6.0 on drupal 4.6.5) and when i launch it i get the following file :
The beginning seems good
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url>
<loc>http://booz.clan.free.fr/drupal/?q=</loc>
<changefreq>always</changefreq>
<priority>1.0</priority>
</url>
Then there are a lot of errors like this (always both of them)
<code>warning: sprintf(): Too few arguments in [...]/includes/database.inc on line 154.
user error: Query was empty query: in [...]/includes/database.mysql.inc on line 66.
Then the rest seems good too
<url>
<loc>http://booz.clan.free.fr/drupal/?q=node/67</loc>
<lastmod>2005-06-08T14:43:49+00:00</lastmod>
<priority>0.4</priority>
<changefreq>monthly</changefreq>
</url>
</urlset>
Any idea what could be causing this ?
I just installed the 4.6.5 version, and added the modules : taxonomy_access (may cause a problem ?), shoutbox (probably hasn't anything to do).
Comments
Comment #1
RizThon commentedHum now I even got one
<code>user error: Query was empty query: in /var/www/sdc/8/a/booz.clan/drupal/includes/database.mysql.inc on line 66.user error: Cross dependency found in OUTER JOIN; examine your ON conditions query: SELECT DISTINCT(node.nid), type, status, promote, comment_count, changed, previously_changed, last_comment_timestamp, previous_comment, priority_override FROM node LEFT JOIN node_comment_statistics ON node.nid=gsitemap.nid LEFT JOIN gsitemap ON node.nid=gsitemap.nid LEFT JOIN url_alias ON src=CONCAT('node/',node.nid) WHERE node.status > 0 AND (gsitemap.priority_override >=0 OR gsitemap.priority_override IS NULL) AND node.type NOT IN ('') in [...]/drupal/includes/database.mysql.inc on line 66.at the end of all the other errors, and then I only have links to taxonomy terms...
I'm kind of, well, lost...
Comment #2
zis commentedI'm having the same thing.
Errors are showing up in watchdog. Here are some:
details
Type php
Date Tuesday, March 7, 2006 - 00:59
User chief
Location /gsitemap
Message Query was empty query: in /home/cultu3/public_html/news/includes/database.mysql.inc on line 66.
Severity error
Hostname ------
details
Type php
Date Tuesday, March 7, 2006 - 00:59
User chief
Location /gsitemap
Message sprintf() [function.sprintf]: Too few arguments in /home/cultu3/public_html/news/includes/database.inc on line 154.
Severity error
Hostname -------
Actually it's only those 2 errors that are repeted hundreds of times.
I'm using 4.6.5.. I tried removing it and reinstalling.. but it's the same.
Comment #3
Hubersan commentedHate to do the "me too!" game, but I'm having the same issue..
6 instances of these 2 errors (in order):
Then:
and
Checking Google, it looks like it never gets anything valid. Any ideas, or if you need anything else, can do.
Comment #4
SamAMac commentedThank you all for the reports.
I suspect that this problem may be caused by the db_rewrite_sql craziness mentioned here: http://drupal.org/node/41138. I have attached a new version of the module to that thread. Could someone here install it and see if it fixes this problem?
Comment #5
Hubersan commentedI tried the gsitemap_4.module, and it didn't seem to make anything better on my system.. exactly same errors.
Comment #6
Cosmos-1 commentedsame problem, new version didnt help.
Is this still going to work as a sitemap? or is it just broken?
Comment #7
jmrukkers commentedIm also getting the same errors
warning: sprintf(): Too few arguments in /....../database.inc on line 154.user error: Query was empty query: in /...../database.mysql.inc on line 66.But I observed something that may help to track this down: I am using a shared drupal installation, using sites/.../settings.php, and the gsitemap module works fine on the sites that are on proper domains (www.xxx.com, www.yyy.org); the error only shows up on a site that is configured on a subdirectory (www.zzz.com/subdir).
Comment #8
Hubersan commentedStrange.. my site is just at the root, and not a shared site, as far as drupal is concerned (it's on a shared server, but drupal shouldn't care about that).
Comment #9
jmrukkers commentedI investigated a bit further, and the root domain instances also have the errors logged into the message table, but for some reason they are in these cases not echoed into the sitemap file, as is the case with the subdomain instance.
Comment #10
jmrukkers commentedOk, I've got it to work, well, of sorts anyway - make sure that you set the error reporting (in admin/settings) to only write errors to the log. This avoids having the errors showing up in the sitemap that is fetched by Google, and the resulting sitemap seems to be ok. The aforementioned errors still show up in the log though; my latest hypotheses is that there needs to be an additional check in the code somewhere to check for deleted or otherwise invalid nodes.
Comment #11
SamAMac commentedThanks go to furmans for finally tracking this one down: http://drupal.org/node/55396.
A fixed version has been committed. It is available immediately through cvs, or you can wait about 12 hours for the tarball to be updated and download it at http://drupal.org/files/projects/gsitemap-4.6.0.tar.gz.
Comment #12
(not verified) commentedComment #13
twohills commentedHi, sorry to rain on the parade, but I have these errors still with latest 4.6.0 gsitemap.module.
I have manually verified all changes in http://cvs.drupal.org/viewcvs/drupal/contributions/modules/gsitemap/gsit...
and still get a mass of these errors on every generation of gsitemap:
Query was empty query: in /var/www/html/iocp/includes/database.mysql.inc on line 66.
sprintf(): Too few arguments in /var/www/html/iocp/includes/database.inc on line 154.
Comment #14
twohills commented...is there a dependency on 4.6.6?? I'm running 4.6.5. I even upgraded database.inc and database.mysql.inc to 4.6.6: no change.
Comment #15
lennart commentedOn Drupal 4.7 and newest gsitemap I get the following error:
You have an error in your SQL syntax near ' node_comment_statistics SET gsitemap.last_comment=node_comment_statistics.last_' at line 1 query: UPDATE gsitemap, node_comment_statistics SET gsitemap.last_comment=node_comment_statistics.last_comment_timestamp WHERE gsitemap.nid=node_comment_statistics.nid i /home/www/includes/database.mysql.inc på linje 120.
When visiting /gsitemap
Comment #16
SamAMac commentedI have made a change in all versions. Now all field references in the field list in the queries passed to db_rewrite_sql are qualified with the table aliases. Hopefully this will fix problems with module foo adding a table reference that includes a column with the same name.
As for the lennart's post, I am puzzled. Which database/database version are you using? The query displayed appears syntactically valid. Am I missing something?
Comment #17
lennart commentedMySQL 3.23.49
It is probably the problem. I do not get the error on other, newer systems.
Comment #18
Doug Preble commentedMySQL 3.23.49
Same error as reported by Lennart in #15 using 4.7 (cvs, 15/05/2006 - 20:16, 14.97 KB) and MySQL 3.23.49.
However, sites running 4.6 on the same server generate no errors.
Comment #19
grcm commentedI'm getting the UPDATE error on PostgreSQL:
ERROR: syntax error at or near "," at character 16
STATEMENT: UPDATE gsitemap, node_comment_statistics SET gsitemap.last_comment=node_comment_statistics.last_comment_timestamp WHERE gsitemap.nid=node_comment_statistics.nid
I don't think doing an UPDATE referencing two tables is valid SQL. That goes for PostgreSQL and other databases like DB2 or Oracle.
I think you need to use a subselect, but I'm not sure if older MySQL versions support those.
Comment #20
SamAMac commentedOnce again you've caught me using the mySQL docs as my SQL reference. My apologies to users of other databases.
I have corrected the problem using a loop to update individual records. It's not an ideal solution, but since the code in question should only once under a specific set of circumstances (namely, if you have comments in place before the gsitemap module is enabled), it should not pose too much of a performance problem.
Fixed code has been committed to all versions.
Comment #21
grcm commentedRe the UPDATE - I have tested it on PostgreSQL and it now works, without errors.
Thanks!
Comment #22
SamAMac commentedChanging this to fixed. Please update if you are still having difficulties with the latest revision.
Comment #23
(not verified) commented