Running cron I get repeatedly the following error:

Unknown column 'vid' in 'field list' query: INSERT INTO xmlsitemap_term (tid, vid, changed, previously_changed, priority_override) VALUES (521, 13, 1242384127, 0, -2) in .../includes/common.inc on line 3422.

When I look at the table description in my mySQL database it reads like:

CREATE TABLE `dru_xmlsitemap_term` (
`tid` int(11) NOT NULL default '0',
`pid` int(11) default NULL,
`last_changed` int(11) default NULL,
`previously_changed` int(11) default NULL,
`priority_override` float default NULL,
PRIMARY KEY (`tid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

The statement refers to column 'vid' but there is only a column 'pid' in the table

also the statement refers to column 'changed' but there is a column 'last_changed' table

I freshly installed the module with the same results.

Comments

avpaderno’s picture

Component: xmlsitemap_term.module » xmlsitemap_taxonomy.module
Status: Active » Postponed (maintainer needs more info)

The database schema is clearly not updated to the last definition used.

The definition of the table schema used is the following:

  $schema['xmlsitemap_term'] = array(
    'description' => 'The base table for xmlsitemap_term.',
    'fields' => array(
      'tid' => array(
        'description' => 'The vocabulary term ID.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'vid' => array(
        'description' => 'The vocabulary ID.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'changed' => array(
        'description' => 'The Unix timestamp of the last change.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'previously_changed' => array(
        'description' => 'The Unix timestamp of the previous change.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'priority_override' => array(
        'description' => 'The priority of the term in the sitemap.',
        'type' => 'float',
        'not null' => TRUE,
        'default' => -2.0,
      ),
    ),
    'primary key' => array('tid'),
  );
  return $schema;
}

I guess you updated the module from the 6.x-0.x-dev version. If this is the case, uninstall the module, which is xmlsitemap_taxonomy, and reinstall it; it will create the correct table.

avpaderno’s picture

Once that #463564: Remove the central database table is implemented, there will not anymore problems of updating from the 6.x-0.x-dev version, which is not even a supported version.

ulrich’s picture

Problem solved. But it was a clean install. I did not have a 6.* version of xml sitemap installed before. Thank you for the very quick response.
Ulrich

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Active

This is strange; it means that in someway the installation function failed to do its task.
I don't really know how that can happen in a clear installation, as in that case the only routine that is executed is the installation function; no update functions are invoked when a module is first installed.

I am setting this as active, until I don't change the code to use a single database table.

avpaderno’s picture

Category: bug » support
Status: Active » Fixed

I am changing the category because the module doesn't use the database schema reported, and a clean install cannot create a database table with that definition.
I am setting the report as fixed because that is what who opened the issue reported.

Froggie-2’s picture

Hi,
I hope this is the appropriate place to reopen this issue.

I too am getting error message on my D6 Admin report even though I had a clean upgrade from the DEV version.

The error message is:

" Unknown column 'changed' in 'field list' query: INSERT INTO xmlsitemap_node (nid, changed, previously_changed, priority_override) VALUES (255120, 1242982484, 1242982484, -2) in /var/www/vhosts/website/httpdocs/includes/common.inc on line 3324."

Thanks

avpaderno’s picture

As this issue is for a different module, and as the error reported from who opened this issue is completely different, I would say that it's not the appropriate place to reopen this issue.

If you are having a problem, then open a issue report for the problem you are having, after you verified that there isn't a issue report for the exactly same topic.
Adding comments to random reports doesn't help anybody, including who is notified of a new comment added to the issue reports they are subscribed too.

Status: Fixed » Closed (fixed)

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