migration problem

peggys mouse - November 8, 2007 - 19:09
Project:Aggregation
Version:5.x-4.0
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

okay, i am really confused.

i recently upgraded drupal from 4.7.6 to 5.3. everything went fine or has been fixed except for my feeds. i was running aggregator2 on D4.7. when i turned on the D5 aggregation module, i got warnings about mismatched column counts. this seems to come from update_6() from the install file.

here are the warnings:

# warning: Illegal offset type in /var/www/drupal-5.3/sites/all/modules/aggregation/aggregation.install on line 259.
# user warning: Column count doesn't match value count at row 1 query: INSERT INTO aggregation_feed VALUES (3879, 'Some Feed', 'http://somefeed.com/?q=node/feed', '', '', 180, 0, 'no', 'yes', 'no', 'no', 'no', 'no', 0 ,'yes', 'yes', 'a:1:{s:0:\"\";a:0:{}}', '', 1192512218, 1193106604) in /var/www/drupal-5.3/includes/database.mysql.inc on line 172.
# user warning: Unknown column 'link_to_original_url' in 'field list' query: INSERT INTO aggregation_item (nid, url, link_to_original_url, original_author, story_guid, fid, image_id, image_guid) VALUES (30175, 'http://somefeed.com/node/view/2783', 'yes', 'Some Feed', 2455770148, 3879, 0, 0) in /var/www/drupal-5.3/includes/database.mysql.inc on line 172.

i'm running this version of aggregator2:

/* $Id: aggregator2.module,v 1.43 2006/07/20 10:52:04 ahwayakchih Exp $ */

there was also a patch i ran on it at some point.

the install script seems to call update_6 from the _install function. if that is the case, there is a large discrepency between the number of columns in the 4.7 aggregator2 tables and the number expected by the upgrade. the insert statement for the feeds wants to insert 20 values but only 14 are defined.

it also appears that update_1 to update_5 are never run. if update_1 were run, it contains "ALTER TABLE {aggregation_feed} ADD aggregate_to_moderation_queue enum('yes', 'no') NOT NULL default 'no' AFTER publish_new_items" but the publish_new_items column does not exist. there would be more similar problems.

i must be missing something. can anyone point me in the right direction to get this fixed? it's been a few weeks since i've had feeds on my site and i'd like to get them back.

thanks!

here are the table definitions from aggregator2 (4.7) that i'm working with:

CREATE TABLE `aggregator2_feed` (
`nid` int(10) NOT NULL default '0',
`author` varchar(60) NOT NULL default '',
`freezed` int(4) NOT NULL default '0',
`url` varchar(255) NOT NULL default '',
`refresh` int(10) NOT NULL default '0',
`clear_items` int(10) NOT NULL default '1000000000',
`update_items` int(4) NOT NULL default '1',
`guid_items` int(4) NOT NULL default '0',
`promoted_items` int(10) NOT NULL default '1000000000',
`checked` int(10) NOT NULL default '0',
`link` varchar(255) NOT NULL default '',
`image` longtext NOT NULL,
`etag` varchar(255) NOT NULL default '',
`modified` int(10) NOT NULL default '0',
`item_status` int(4) NOT NULL default '0',
`item_taxonomy` longtext NOT NULL,
`item_date_source` tinyint(3) unsigned NOT NULL default '0',
`item_show_link` tinyint(3) unsigned NOT NULL default '0',
`item_delete_mode` int(4) NOT NULL default '0',
PRIMARY KEY (`nid`),
UNIQUE KEY `url` (`url`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `aggregation_item` (
`nid` int(10) unsigned NOT NULL,
`url` varchar(250) NOT NULL default '',
`aggregation_item_options` text NOT NULL,
`original_author` varchar(100) NOT NULL default '',
`original_comments` varchar(250) NOT NULL,
`story_guid` int(10) unsigned NOT NULL default '0',
`fid` int(10) unsigned NOT NULL default '0',
`image_id` int(10) unsigned NOT NULL default '0',
`image_guid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`nid`),
KEY `story_guid` (`story_guid`),
KEY `image_id` (`image_id`),
KEY `fid` (`fid`),
KEY `image_guid` (`image_guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

#1

vito_swat - November 9, 2007 - 12:08
Category:support request» bug report

Well, there's a bug in aggregation ver. 3.2 and above connected with major recoding of the module. So when you are installing on clean Drupal install you have problems mentioned above. Workaround should be:
1) Uninstall aggregation module
2) Check if all agregation tables are deleted
3) Install version 5-x.3-1. During install it should import your feeds from aggregarot2 module
4) Upgrade module to current version.

We should create special function which is doing the same as update_6 but on current database schema, so I'm changing it to bug.

#2

peggys mouse - November 9, 2007 - 19:25

thanks for the speedy help. your workaround seems to have worked for me. if it is a lot of work to patch this, it might be easier just to mention in the documentation the extra step required to get the full upgrade. it wasn't that much more work really.

this warning still appeared a bunch of times but didn't seem to affect anything obvious:

warning: Illegal offset type in /var/www/drupal-5.3/sites/all/modules/aggregation/aggregation.install on line 264.

line 264 starts with $taxonomies_new_style...

foreach ($taxonomies_old_style AS $key => $value)
        {
            $vid = db_fetch_object(db_query("SELECT vid FROM {term_data} WHERE tid = %d", $value))->vid;
            $taxonomies_new_style[$vid][$value] = $value;
        }

now i just have to figure out the theming. :)

#3

mistknight - April 18, 2008 - 23:45

Hey vito, what exactly is the bug here and how can we fix it?

 
 

Drupal is a registered trademark of Dries Buytaert.