I used gsitemap perfectly until today (03.17.2007) - I updated for the new version of gsitemap.
I overwrite all the files on sites/all/modules, went to mysite.org/update.php.
updated this module and everything seems to be OK.
but when I created a new post I got this error above the post:
http://i22.photobucket.com/albums/b304/shahard333/error-1.jpg?t=1174128341

can someone help my to solve this problems? thanks.

Comments

brianV’s picture

Category: support » bug
Priority: Normal » Critical

I can confirm, I am having the same problem. I am moving this to the Bug list since this is a bug introduced in the latest release.

I set the priority as critical since the module is useless in this state.

bwynants’s picture

Status: Active » Needs review
StatusFileSize
new5.31 KB

This fixes it for me.

removed sprintf's and DISTINCT that gets added by automatically by drupal

shahard333’s picture

Thanks bwynants for the patch,
but I don't know how to patch :|... do you have any guide out there?

bwynants’s picture

shahard333’s picture

Thank for the fast repaly :)

I'm on shared hosting and I can't install all those auto patching software and to type all those command.
How can I do it manually?

bwynants’s picture

simple question but there are no simple answers.
here's how I do it om my mac, can't give you an answer for a Windoze computer...

I grab a copy of the module, extract it
I grab the patch file and drop it in that same directory
I open a terminal window and CD to the place where the module is.
I type patch < nae_of_the_patch

that's it!

Boletus’s picture

Is this the same 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 &#039;DISTINCT(n.nid)), n.type, n.status, n.promote, s.comment_count, n.changed, g.pre&#039; at line 1 query: SELECT DISTINCT ( DISTINCT(n.nid)), n.type, n.status, n.promote, s.comment_count, n.changed, g.previously_changed, s.last_comment_timestamp, g.previous_comment, g.priority_override FROM node n LEFT JOIN node_comment_statistics s ON n.nid = s.nid LEFT JOIN gsitemap g ON n.nid = g.nid LEFT JOIN url_alias u ON src = CONCAT(&#039;node/&#039;, n.nid) INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view &gt;= 1 AND ((na.gid = 0 AND na.realm = &#039;all&#039;) OR (na.gid = 1 AND na.realm = &#039;term_access&#039;))) AND ( n.status &gt; 0 AND (g.priority_override &gt;= 0 OR g.priority_override IS NULL) AND n.type NOT IN (&#039;&#039;) AND n.nid &gt;= 0 AND n.nid &lt; 10000)  in /home/web25833/domains/sitename/public_html/includes/database.mysql.inc on line 172.
mgifford’s picture

StatusFileSize
new1.34 KB

This is the error I'm getting (before and after applying the patch), that comes when I create new content:

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: INSERT INTO gsitemap (nid, last_changed, priority_override) VALUES (33, 1174243933, ) in /home/dm_50/includes/database.mysql.inc on line 172.

Seems that the problem was fixed with $node->priority_override = 0; seems the NULL wasn't good enough.

mgifford’s picture

I should have added that this is the same error that the original poster reported. Also, since it's an sql error, worth saying that I'm running mysql-5.0.27-1.fc5.

Mike

shahard333’s picture

Yes, changing from $node->priority_override = NULL; to $node->priority_override = 0; seems to work.
Now we only need see if it's sending data to the sitemap.

Thank for the solution.

bwynants’s picture

Component: Documentation » Code
StatusFileSize
new7.64 KB

again a patch to be applied against CVS version fixes 2 issue's, the error from comment 7 (http://drupal.org/node/128636#comment-215630)
and issue http://drupal.org/node/123952

bwynants’s picture

StatusFileSize
new23.73 KB

full module for those that can not patch, move the .txt after download

darren oh’s picture

Status: Needs review » Fixed

Fixed in CVS commits 61134 and 61135. Thank to those who found the errors.

shahard333’s picture

Thanks for all the patch and the files. the new module working great now.

hectorplus’s picture

I didn't even know i was getting the same error. I found it in the log.

One thing i noticed is that my links that were submitted berore to google site maps have disappeared. The webmasters google page, in the "Links submitted" says, 1 only. Before it was over 180.

What do i do? Resave all my nodes to let Google know about it again? Anyone with the same problem?

Thanks.

Patrick Nelson’s picture

The same error still occurs (as of latest version today) in the 4.7.x version. To be exact:

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 = 2' at line 1 query: UPDATE gsitemap SET last_changed = 1174394668, previously_changed = 1162485615, priority_override = WHERE nid = 2 in /home/airconco/public_html/includes/database.mysql.inc on line 121.

If I need to create a new issue specifically for the 4.7 version, let me know.

Regards

Patrick

bwynants’s picture

thats is a different issue (related to http://drupal.org/node/123952 i think)

Patrick Nelson’s picture

Thanks bwynants,

However that post refers back to this one for a patch. But, as previously stated, the problem is with 4.7.x and the patches on this page are only for 5.x (AFAIK).

Any ideas, anyone?

SamAMac’s picture

Fixed in 4.7-dev by 61668.

Anonymous’s picture

Status: Fixed » Closed (fixed)