I downloaded and installed gsitemap.module today and even generated a google sitemap which I could successfully submit at google. However, when users now want to comment on any nodes they see an error message after submitting their comment.

The comment is saved, but the error message is rather ugly:

user error: 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 'WHERE nid=38' at line 1
query: UPDATE gsitemap SET last_comment=1122309057, previous_comment= WHERE nid=38 in /var/www/housetier.kicks-ass.net/includes/database.mysql.inc on line 66.

warning: Cannot modify header information - headers already sent by (output started at /var/www/housetier.kicks-ass.net/includes/common.inc:384) in /var/www/housetier.kicks-ass.net/includes/common.inc on line 192.

This and nothing else is displayed to the user. After disabling gsitemap.module these errors went away also.

I have Drupal 4.6.2 and the following modules (+ activated, - not activated):
+ adminblock
+ captcha
+ front_page
+ highlight
- legal
+ print
+ spam
- themedev
+ workspace
+ article
+ diff
+ glossary
- hof
+ marksmarty
+ quote
+ subscriptions
- theme_editor
+ atom
+ donations
- gsitemap-cvs
+ img_assist
- nodewords
+ simplenews
+ taxonomy_block
- trackback
- bookmarks
+ feedback
- guestbook
+ indexpage
+ pathauto
+ site_map
- taxonomy_multi_edit
+ trip_search

Hope this information helps...

CommentFileSizeAuthor
#3 gsitemap.module7.08 KBSamAMac
#1 gsitemap.module.patch1.68 KBSamAMac

Comments

SamAMac’s picture

Assigned: Unassigned » SamAMac
Status: Active » Needs review
StatusFileSize
new1.68 KB

Thank you for your very clear report.

I had not checked the code thoroughly after removing the cron hook. The faulting code assumed that there would already be a row for the node the comment was posted on, which was not the case.

A fixed version has been committed to cvs, but will not be tarred until tomorrow morning. A patch is attached.

housetier’s picture

Thanks for the very quick reply :D

However, I am unable to apply the patch. When I download the file it contains all kinds of colorful markup, patch of course does not like this. Next I display it my browser window and copy & paste the text, and save into a file. Still patch complains:

patching file gsitemap.module
patch: **** malformed patch at line 9: <?php

Is there a way to download the patch without any markup whatsoever?

SamAMac’s picture

StatusFileSize
new7.08 KB

Well, here's the whole module. That should work.

housetier’s picture

Status: Needs review » Closed (fixed)

Yes thank you very much again for the super-quick response. The module works fine now.