Hi all

Thought I would add these two small problems as someone may have a clue what they mean, and they are the only other problem I seem to be having beside my post about nodes and roles. These are not mission critical as I could easily disable search and rarely check hits, but would rather try to get it working right if possible.

When I go to administer >> hits I get the following error message:

user error: Unknown column 'a.aid' in 'field list'
query: SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM accesslog a LEFT JOIN users u ON u.uid = a.uid ORDER BY a.timestamp DESC LIMIT 0, 30 in /home/fastst/public_html/test/includes/database.mysql.inc on line 66.

When I go to search site and run a search I get this message:

user error: Unknown column 'i.sid' in 'field list'
query: SELECT DISTINCT i.sid, i.type FROM search_index i INNER JOIN node n ON n.nid = i.sid INNER JOIN users u ON n.uid = u.uid WHERE n.status = 1 AND (i.word = 'sjdf' OR i.word = 'ljasdf') in /home/fastst/public_html/test/includes/database.mysql.inc on line 66.

I posted them together as they seem similar, perhaps connected. I'm not to good with msql but can use phpmyadmin if I need to. Thanks for any suggestions.

Caveman

PS. I just recently did the upgrade from 4.52 to 4.62. I ran update.php from 1/7/2005 on (I think that was the date). Otherwise little or no tampering with the 4.62 install.

Comments

Ward’s picture

I'm experiencing the same after my upgrade from 4.4 => 4.5 => 4.6.3
It only happens on http://site/admin/logs/hits from what I've seen so far.

Any fix know for this ?

TomChiverton’s picture

It's happening in my 5.2 (up'ed from 4.7.x recently) too.
The fix was to add a new column to the accesslog table, named 'aid' of type 'serial'. I guess the upgrade.php script missed that.

batigolix’s picture

you could use this sql to re-create the accesslog table

(for drupal 5.7)

DROP TABLE IF EXISTS `accesslog`;
CREATE TABLE `accesslog` (
  `aid` int(11) NOT NULL auto_increment,
  `sid` varchar(64) NOT NULL default '',
  `title` varchar(255) default NULL,
  `path` varchar(255) default NULL,
  `url` varchar(255) default NULL,
  `hostname` varchar(128) default NULL,
  `uid` int(10) unsigned default '0',
  `timer` int(10) unsigned NOT NULL default '0',
  `timestamp` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`aid`),
  KEY `accesslog_timestamp` (`timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;