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 'type for db_type_placeholder WHERE type = unsupported type for db_type_placehold' at line 1 query: UPDATE xmlsitemap SET type = unsupported type for db_type_placeholder WHERE type = unsupported type for db_type_placeholder in /var/www/vhosts/....../httpdocs/sites/all/modules/xmlsitemap/xmlsitemap.module on line 632.

my host use mysql version 5.0.45 PHP 5.2.17

Comments

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

I can't confirm this was a problem. The upgrade ran fine for me. Is the XML sitemap module disabled when you ran the update?

meefanyung’s picture

i disable xml sitemap before update. after update i enable module it still work fine.

No error or warning about this problem at my site now. if i got problem or error i will report it.

stan turyn’s picture

I can confirm the exact same error on running update.php after upgrading to 6.x-2.0-beta2.

Mysql version - 5.1.37
PHP - 5.2.10

The directory sites/default/files/xmlsitemap/NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM has been created.
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 'type for db_type_placeholder WHERE type = unsupported type for db_type_placehold' at line 1 query: UPDATE xmlsitemap SET type = unsupported type for db_type_placeholder WHERE type = unsupported type for db_type_placeholder in ****/sites/all/modules/xmlsitemap/xmlsitemap.module on line 632.
The following queries were executed
xmlsitemap module
Update #6203
ALTER TABLE {xmlsitemap_sitemap} ADD `max_filesize` INT unsigned NOT NULL DEFAULT 0
Update #6204
ALTER TABLE {xmlsitemap_sitemap} DROP KEY context_hash
ALTER TABLE {xmlsitemap_sitemap} DROP smid
ALTER TABLE {xmlsitemap_sitemap} CHANGE `context_hash` `smid` VARCHAR(64) NOT NULL
ALTER TABLE {xmlsitemap_sitemap} ADD PRIMARY KEY (smid)
xmlsitemap_menu module
Update #6201

gemini’s picture

Same issue. XML Sitemap modules were all disabled while running update.php

Drupal 6.20
MySQL 5.1.49
PHP 5.2.10
Apache 2.2.16

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 'type for db_type_placeholder WHERE type = unsupported type for db_type_placehold' at line 1 query: UPDATE xmlsitemap SET type = unsupported type for db_type_placeholder WHERE type = unsupported type for db_type_placeholder in /home/somesite/sites/all/modules/xmlsitemap/xmlsitemap.module on line 632.

The following queries were executed
xmlsitemap module
Update #6203
ALTER TABLE {xmlsitemap_sitemap} ADD `max_filesize` INT unsigned NOT NULL DEFAULT 0
Update #6204
ALTER TABLE {xmlsitemap_sitemap} DROP KEY context_hash
ALTER TABLE {xmlsitemap_sitemap} DROP smid
ALTER TABLE {xmlsitemap_sitemap} CHANGE `context_hash` `smid` VARCHAR(64) NOT NULL
ALTER TABLE {xmlsitemap_sitemap} ADD PRIMARY KEY (smid)
xmlsitemap_engines module
Update #6202
The following search engines have deprecated their XML sitemap ping services and have been disabled: Ask.com, Moreover, Yahoo.com.
xmlsitemap_menu module
Update #6201
No queries

gemini’s picture

I don't know if this error was the reason, but my xml cache file wasn't populated with any data, even though the status was showing that my sitemap is up to date and doesn't need to be regenerated. The tables also contained all the URLs, although they weren't written into the XML file.

I uninstalled the module completely and re-installed from scratch. Everything seem to work fine now.

steinmb’s picture

Title: User Warning while upgrade » User Warning while upgrade from 1.x -branch
Version: 6.x-2.0-beta2 » 6.x-2.0-beta3
Status: Postponed (maintainer needs more info) » Active

Also go this upgrading from 1.x branch. Running 'drush updatedb' for a live site in my local sandbox:

 Executing xmlsitemap_user_update_6201 [success]                                                     
 The primary xmlsitemap table upgrade has not yet been completed. Re-run the upgrade script. [error]

It also throws this further down:

  Executing xmlsitemap_update_6201                                                                         
  UPDATE {system} SET weight = 1 WHERE type = 'module' AND name = 'xmlsitemap'         
  Executing xmlsitemap_update_6202                                                                         

  WD php: Unknown column 'max_filesize' in 'field list'                 [error]                            

  query: INSERT INTO xmlsitemap_sitemap (smid, context, updated, links, chunks, max_filesize)              
    VALUES ('NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM', 'a:0:{}', 0, 0, 0, 0) in                        
  /Users/steinmb/htdocs/sites/ipvalueadded.com/drupal/includes/common.inc on line 3538.                    
  CREATE TABLE {xmlsitemap_sitemap} (                                                                      
  `smid` INT unsigned NOT NULL auto_increment,                                                             
  `context_hash` VARCHAR(32) NOT NULL DEFAULT '',                                                
  `context` TEXT NOT NULL,                                                                                 
  `updated` INT unsigned NOT NULL DEFAULT 0,                                                               
  `links` INT unsigned NOT NULL DEFAULT 0,                                                                 
  `chunks` INT unsigned NOT NULL DEFAULT 0,                                                                
  PRIMARY KEY (smid),                                                                                      
  UNIQUE KEY context_hash (context_hash)                                                                   
  ) /*!40100 DEFAULT CHARACTER SET utf8 */                                                                 
  Executing xmlsitemap_update_6203                                                                         
  ALTER TABLE {xmlsitemap_sitemap} ADD `max_filesize` INT unsigned NOT NULL DEFAULT 0                      
  Executing xmlsitemap_update_6204                                                                         
  ALTER TABLE {xmlsitemap_sitemap} DROP KEY context_hash                                                   
  ALTER TABLE {xmlsitemap_sitemap} DROP smid                                                               
  ALTER TABLE {xmlsitemap_sitemap} CHANGE `context_hash` `smid` VARCHAR(64) NOT NULL                       
  ALTER TABLE {xmlsitemap_sitemap} ADD PRIMARY KEY (smid)                                                  
  Executing xmlsitemap_node_update_6196                                                                    
  Executing xmlsitemap_node_update_6198                                                                    
  Executing xmlsitemap_node_update_6200                                                                    
  Executing xmlsitemap_node_update_6201                                                                    
  DROP TABLE {xmlsitemap_node}                                                                             
  UPDATE {system} SET weight = 0 WHERE type = 'module' AND name = 'xmlsitemap_node'    
  Executing xmlsitemap_engines_update_6196                                                                 
  Executing xmlsitemap_engines_update_6198                                                                 
  Executing xmlsitemap_engines_update_6200                                                                 
  Executing xmlsitemap_engines_update_6201                                                                 
  UPDATE {system} SET weight = 2 WHERE type = 'module' AND name = 'xmlsitemap_engines' 
  Executing xmlsitemap_engines_update_6202                                                                                            
  The following search engines have deprecated their XML sitemap ping services and have been disabled: Ask.com, Moreover, Yahoo.com.  
  'all' cache was cleared              
  Finished performing updates.

Rerunning 'drush updatedb' and it do:

The following updates are pending: 
                                         
 xmlsitemap_user module                  
 6201 - Migrate 6.x-1.x user data.                                  
 6202 - Cleanup any remaining 6.x-1.x tables, variables or weights. 

Executing xmlsitemap_user_update_6201   
Executing xmlsitemap_user_update_6202   
DROP TABLE {xmlsitemap_user}            
DROP TABLE {xmlsitemap_user_role}                                                                    
UPDATE {system} SET weight = 0 WHERE type = 'module' AND name = 'xmlsitemap_user'
'all' cache was cleared             
Finished performing updates.

Now is it finishing correctly the remaining updates. A bit strange error, are we looking at some kind of race condition?

Best regards
Steinmb

Anonymous’s picture

I don't know that the update has been tested with drush before. But at least it knew where to pick up and go. Giving the trouble Dave had getting an update from 1.x to 2.x working I'm happy it worked.

SchwebDesign’s picture

i got this error as well. thanks for all your work.

alexandreracine’s picture

I had this:
user warning: Unknown column 'max_filesize' in 'field list' query: INSERT INTO xmlsitemap_sitemap (smid, context, updated, links, chunks, max_filesize) VALUES ('NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM', 'a:0:{}', 0, 0, 0, 0) in /var/www/includes/common.inc on line 3538.

Everything seems fine...

jelo’s picture

I just ran into the same error, but everything seems to work fine...

Unknown column 'max_filesize' in 'field list' query: INSERT INTO xmlsitemap_sitemap (smid, context, updated, links, chunks, max_filesize) VALUES ('NXhscRe0440PFpI5dSznEVgmauL25KojD7u4e9aZwOM', 'a:0:{}', 0, 0, 0, 0) in /var/vhosts/northstudio.grad.ubc.ca/htdocs/versions/11/includes/common.inc on line 3579.

Anonymous’s picture

If you're missing max_filesize then you need to execute the update.php and make sure it executes update 6203 and 6204.

but everything seems to work fine

I doubt that it is working fine or you would not have received this error. Rerun the update.php script as uid 1.

steinmb’s picture

Version: 6.x-2.0-beta3 » 6.x-2.0-rc1

And I guess this is RC1 not any of the beta?

dave reid’s picture

Version: 6.x-2.0-rc1 » 6.x-2.0-beta3

I believe you can safely ignore this actually. Sitemap records are saved before the max_filesize column is added, but it shouldn't be something that needs fixing.

jelo’s picture

Yes, it was RC1. What happened was that one Insert was not executed to enter a sitemap file/id into xmlsitemap_sitemap. Status Report showed some issues with XML sitemap due to old cache files still being available. After I cleared the cached files manually, I went to the configuration screen and clicked "Add XML sitemap". Then an entry was made into the table and the sitemap was built...

Anonymous’s picture

Version: 6.x-2.0-beta3 » 6.x-2.x-dev
Category: bug » support

Dave Reid, the user will still need to execute update.php if file_maxsize is missing as per my earlier comment especially because of 6204; the PRIMARY_KEY changed in that update. I agree that nothing needs fixing in the code but the end user does need to fix his table by executing update.php for update 6203.

dave reid’s picture

The user doesn't need to fix anything. The real problem is calling xmlsitemap_sitemap_save() in xmlsitemap_update_6202(). Due to the use of drupal_write_record(), it attempts to use the schema in xmlsitemap_schema() which includes the max_filesize column, even though it hasn't been added yet. This is when we see the error, and it can be safely ignored. The very next update adds the max_filesize column and fills the values for it.

steinmb’s picture

Status: Active » Fixed

Consider this done.

Status: Fixed » Closed (fixed)

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