I have enabled the xmlsitemap_node module. I am NOT running path_auto.

It appears that I am only getting menu items in the sitemap.

Here's the url for the actual sitemap: http://www.fusedglass.org/sitemap.xml

I have tried disabling the cache, creating a new forum topic post-xmsitemap install, running chron before and after those steps...

Any help is appreciated. I'm baffled.

Thanks,
Paul

Comments

darren oh’s picture

Status: Active » Postponed (maintainer needs more info)

First thing to do is check each step in the handbook: Adding nodes to your site map.

tarlow’s picture

Thanks for the quick reply Darren.

I (re)reviewed the steps in the handbook and as best I can tell I have followed all of them.

Still no luck.

Not sure if it is relevant, but the first time I installed the module I got a collation error. I disabled it, installed the dev snapshot, and re-enabled -- no errors.

There is a populated xmlsitemap_node table in the db.

Thanks

darren oh’s picture

Maybe there is an error in the database. Try uninstalling: Uninstalling Drupal modules. Also check your Drupal error log.

tarlow’s picture

I uninstalled, re-installed and - though I didn't get any error messages I did see this in the log:

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' query: SELECT n.nid, n.type, n.promote, s.comment_count, n.changed, xn.previously_changed, s.last_comment_timestamp, xn.previous_comment, xn.priority_override, COALESCE(ua.dst) AS alias FROM node n LEFT JOIN node_comment_statistics s ON n.nid = s.nid LEFT JOIN url_alias ua ON ua.src = CONCAT('node/', CAST(n.nid AS CHAR)) LEFT JOIN xmlsitemap_node xn ON n.nid = xn.nid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'forum_access'))) AND ( n.status > 0 AND (n.type NOT IN ('') AND xn.priority_override IS NULL OR xn.priority_override >= 0) AND n.nid <> 49 ) GROUP BY n.nid, n.type, n.promote, s.comment_count, n.changed, xn.previously_changed, s.last_comment_timestamp, xn.previous_comment, xn.priority_override in /home/fglass/public_html/includes/database.mysql.inc on line 172.

Suggestions? My knowledge of SQL is limited and I'm pretty green on php.

Do you I just need to figure out how to convert all the tables to utf8_unicode?

Thanks

tarlow’s picture

I updated tables here's what I'm getting in the log when I access sitemap.xml:

page not found 09/04/2008 - 15:04 sites/all/modules/xmlsitemap/gss/gss.js Paul Tarlow
page not found 09/04/2008 - 15:04 sites/all/modules/xmlsitemap/gss/gss.css Paul Tarlow
php 09/04/2008 - 15:04 Illegal mix of collations ... Anonymous

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' query: SELECT t.tid, t.vid, v.module, xt.last_changed, xt.previously_changed, xt.priority_override, COALESCE(ua.dst) AS alias FROM term_data t LEFT JOIN vocabulary v ON t.vid = v.vid LEFT JOIN xmlsitemap_term xt ON t.tid = xt.tid LEFT JOIN url_alias ua ON ua.src = CONCAT('forum/', CAST(t.tid AS CHAR)) LEFT JOIN forum_access fa ON t.tid = fa.tid LEFT JOIN acl acl ON acl.name = t.tid AND acl.module = 'forum_access' LEFT JOIN acl_user aclu ON aclu.acl_id = acl.acl_id AND aclu.uid = 0 WHERE ((fa.grant_view >= 1 AND fa.rid IN (1)) OR fa.tid IS NULL OR aclu.uid = 0) AND ( (t.vid NOT IN (0) AND xt.priority_override IS NULL OR xt.priority_override >= 0) AND t.tid <> 0 ) GROUP BY t.tid, t.vid, v.module, xt.last_changed, xt.previously_changed, xt.priority_override in /home/fglass/public_html/includes/database.mysql.inc on line 172.

php 09/04/2008 - 15:04 Illegal mix of collations ... Anonymous

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' query: SELECT n.nid, n.type, n.promote, s.comment_count, n.changed, xn.previously_changed, s.last_comment_timestamp, xn.previous_comment, xn.priority_override, COALESCE(ua.dst) AS alias FROM node n LEFT JOIN node_comment_statistics s ON n.nid = s.nid LEFT JOIN url_alias ua ON ua.src = CONCAT('node/', CAST(n.nid AS CHAR)) LEFT JOIN xmlsitemap_node xn ON n.nid = xn.nid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'forum_access'))) AND ( n.status > 0 AND (n.type NOT IN ('') AND xn.priority_override IS NULL OR xn.priority_override >= 0) AND n.nid <> 49 ) GROUP BY n.nid, n.type, n.promote, s.comment_count, n.changed, xn.previously_changed, s.last_comment_timestamp, xn.previous_comment, xn.priority_override in /home/fglass/public_html/includes/database.mysql.inc on line 172.

darren oh’s picture

Title: No nodes (forum topics, etc.) in sitemap » Illegal mix of collations for xmplsitemap_node

Renamed to prevent duplicate issues.

darren oh’s picture

Title: Illegal mix of collations for xmplsitemap_node » Illegal mix of collations for xmlsitemap_node
tebb’s picture

Hi Tarlow,

If you paste this query into PHPMyAdmin and run it *on an empty database to ensure it fails*, it will redisplay the query as shown below, making it a little easier to read.

SELECT n.nid, n.type, n.promote, s.comment_count, n.changed, xn.previously_changed, s.last_comment_timestamp, xn.previous_comment, xn.priority_override, COALESCE( ua.dst ) AS alias
FROM node n
LEFT JOIN node_comment_statistics s ON n.nid = s.nid
LEFT JOIN url_alias ua ON ua.src = CONCAT( 'node/', CAST( n.nid AS CHAR ) )
LEFT JOIN xmlsitemap_node xn ON n.nid = xn.nid
INNER JOIN node_access na ON na.nid = n.nid
WHERE (
na.grant_view >=1
AND (
(
na.gid =0
AND na.realm = 'all'
)
OR (
na.gid =1
AND na.realm = 'forum_access'
)
)
)
AND (
n.status >0
AND (
n.type NOT
IN (
''
)
AND xn.priority_override IS NULL
OR xn.priority_override >=0
)
AND n.nid <>49
)
GROUP BY n.nid, n.type, n.promote, s.comment_count, n.changed, xn.previously_changed, s.last_comment_timestamp, xn.previous_comment, xn.priority_override

The important bit for this issue is which tables are being used and what their collation is. The tables are in the section near the top, between the words FROM and WHERE.

I suggest you use PHPMyAdmin or other database admin tool to check the collation for each of the tables in this query in your site's database.

Tables:

node
node_comment_statistics
url_alias
xmlsitemap_node
node_access

If you can list the collation of these tables it might help Darren understand where the problem is and if it's being caused by XML sitemap.

@ Darren: Fantastic module by the way :)

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Fixed

Setting it to fixed because there have been no feedbacks in the past two months.

timurek’s picture

Status: Fixed » Active

Sorry, but figured anyone out HOW TO FIX this issue? I have the same message on screen after any node update or add:

Illegal mix of collations (utf8_czech_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' query: INSERT INTO drupal_xmlsitemap_node (nid, pid, last_changed, priority_override) SELECT 906, ua.pid, 1228921492, NULL FROM drupal_node n LEFT JOIN drupal_url_alias ua ON ua.src = CONCAT('node/', CAST(906 AS CHAR)) LIMIT 1 v souboru /data/home/zakaznici/timurova.com/www/includes/database.mysql.inc

Also, no new content appear in sitemap.xml :-/

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Active » Postponed
avpaderno’s picture

I guess the problem is caused by CONCAT(). If the SQL query would not use that function, then there would not be that error.

yan’s picture

Status: Postponed » Active

I'm getting the same error message in 5.x-1.6:

user warning: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' query: UPDATE xmlsitemap_node xn INNER JOIN url_alias ua ON ua.src = CONCAT('node/', CAST(xn.nid AS CHAR)) SET xn.pid = ua.pid WHERE xn.pid IS NULL in /<...>/includes/database.mysql.inc on line 174.

I just moved the whole site (files & database) to an new server. Before (using 5.x-1.4), I didn't get that message.

I can see in phpmyadmin that the two xmlsitemap tables (xmlsitemap_additional and xmlsitemap_node) are utf8_general_ci, while the rest of the site's tables are utf8_unicode_ci (it was like that before, too). When I change it, the problem persists. When I uninstall the module and reactivate it, the tables are in utf8_general_ci again, the problem persists.

Edit: The message doesn't show up anymore when I downgrade to 5.x-1.4 but persists in 5.x-1.5

avpaderno’s picture

Component: xmlsitemap_node » xmlsitemap_node.module
Category: support » bug

The referring version is 5.x-2.x-dev because it's the only Drupal 5 version that eventually will get any fixes, or any other modifies in the code. Any additional comments about the 5.x-1.6 version is therefore useless.

The postponed status doesn't mean the issue reported is not active; it simply mean that the maintainers of the project are investigating on the issue, and they postponed any change on the code.
Who is not a maintainer of the project should avoid to change it back to active.

Just to understand better: what database engine are you using?

yan’s picture

Status: Active » Postponed

The postponed status doesn't mean the issue reported is not active; it simply mean that the maintainers of the project are investigating on the issue, and they postponed any change on the code. Who is not a maintainer of the project should avoid to change it back to active.

Sorry for that.

Just to understand better: what database engine are you using?

I am using MySQL. The version installed on the server is 5.0.51a.

avpaderno’s picture

I don't see anything wrong in the declaration of the database tables; maybe the problem is simply caused by the use of the CONCAT() SQL function in the query.

That part should be changed, but to do that most of the code of the project should be changed as well.
I will see what can be done.

avpaderno’s picture

DwightAspinwall pointed out the solution to this problem.
I am going to change the code in xmlsitemap_node.module to correct the call to CAST() made in the SQL query.

Thanks again to DwightAspinwall.

@yan: The collation of Drupal tables should be utf8_general_ci. If you have any tables with a different collation, you should convert them to utf8_general_ci.

avpaderno’s picture

Title: Illegal mix of collations for xmlsitemap_node » Illegal mix of collations
Component: xmlsitemap_node.module » Code
Status: Postponed » Fixed

I committed the fixed code in CVS.

I have not found any documentation about PostgreSQL, therefore the fix is only for MySQL.
If anybody would have a problem with PostgreSQL is free to reopen this report.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.