I can't add any RSS content to my aggregator, this is the message that Drupal v4.7 return each time I try to add a feed :
Type php
Date Jeudi, Mai 4, 2006 - 12:36
User Test
Emplacement http://localhost/drupal/?q=admin/aggregator/add/feed
Page référante http://localhost/drupal/?q=admin/aggregator/add/feed
Message Field 'description' doesn't have a default value query: INSERT INTO aggregator_feed (fid, title, url, refresh, block) VALUES (3, 'drupal.org - Community plumbing', 'http://drupal.org/rss.xml', 3600, 5) dans C:\Program Files\Developpement\www\drupal\includes\database.mysql.inc à la ligne 120.
Importance erreur
Nom d'hôte 127.0.0.1
When I add a new feed like :
title : drupal.org - Community plumbing
url : http://drupal.org/rss.xml
Drupal report :
user warning: Field 'description' doesn't have a default value query: INSERT INTO aggregator_feed (fid, title, url, refresh, block) VALUES (4, 'Drupal', 'http://drupal.org/rss.xml', 3600, 5) in C:\Program Files\Developpement\www\drupal\includes\database.mysql.inc on line 120.
Drupal repport that the feed is added (but it don't do it.)
My local test site works under WinXP and I use Apache v2.0.55, PHP v5.1.2 with MySQL v5.0.18
I have install the last Drupal release 4.7, (new full install...)
I don't know if this error is repported, I have search before create this message but found nothing about this error so I don't know if it's a configuration problem or is there anyone who get the same error ?
Comments
Comment #1
buddaThis is related to the aggregator.module in Drupal Core.
Comment #2
heavenonfremont CreditAttribution: heavenonfremont commentedAny update or fix for this issue?
Comment #3
wmc-1 CreditAttribution: wmc-1 commentedTry this work around:
1) Export the aggregator_feed table to a file
2) Delete the table from your database
3) Edit the file you exported and add --> default '', <-- to the description and image field definitions (see below)
3) Import the table back into your database
CREATE TABLE `aggregator_feed` (
`fid` int(10) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`url` varchar(255) NOT NULL default '',
`refresh` int(10) NOT NULL default '0',
`checked` int(10) NOT NULL default '0',
`link` varchar(255) NOT NULL default '',
`description` longtext NOT NULL default '',
`image` longtext NOT NULL default '',
`etag` varchar(255) NOT NULL default '',
`modified` int(10) NOT NULL default '0',
`block` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`fid`),
UNIQUE KEY `link` (`url`),
UNIQUE KEY `title` (`title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Comment #4
wmc-1 CreditAttribution: wmc-1 commentedTry this work around:
1) Export the aggregator_feed table to a file
2) Delete the table from your database
3) Edit the file you exported and add default '', to the description and image field definitions (see below)
3) Import the table back into your database
CREATE TABLE `aggregator_feed` (
`fid` int(10) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`url` varchar(255) NOT NULL default '',
`refresh` int(10) NOT NULL default '0',
`checked` int(10) NOT NULL default '0',
`link` varchar(255) NOT NULL default '',
`description` longtext NOT NULL default '',
`image` longtext NOT NULL default '',
`etag` varchar(255) NOT NULL default '',
`modified` int(10) NOT NULL default '0',
`block` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`fid`),
UNIQUE KEY `link` (`url`),
UNIQUE KEY `title` (`title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Comment #5
Kjartan CreditAttribution: Kjartan commentedCan't reproduce this on a fresh install of 5.0-dev. Re-open and provide more information if you can re-reproduce it.
Comment #6
anuaimi CreditAttribution: anuaimi commentedI have just installed 5.1 and run into the same problem. It seems that 'description' and 'image' have to be NOT NULL but the INSERT does not set these.
I fixed the problem by changing the INSERT in aggregator_module to the following...
INSERT INTO {aggregator_feed} (fid, title, url, refresh, block, description, image) VALUES (%d, '%s', '%s', %d, 5, '', '')
Comment #7
jurgenlinder CreditAttribution: jurgenlinder commentedI installed the Aggergatur module and tried to add a first RSS feed.
After filling out the required fields, the following 2 message boxes show up:
1.
user warning: Field 'description' doesn't have a default value query: INSERT INTO aggregator_feed (fid, title, url, refresh, block) VALUES (2, 'Yahoo! Finance: Major Airlines Industry News', 'http://finance.yahoo.com/rss/MajorAirlines', 3600, 5) in C:\Server\Sites\bellywings.com\includes\database.mysql.inc on line 172.
2.
The feed Yahoo! Finance: Major Airlines Industry News has been added.
Although the second message suggests that the new feed has been added, it has not!
I will go ahead and try to fix the issue just as the last comment suggests:
I have just installed 5.1 and run into the same problem. It seems that 'description' and 'image' have to be NOT NULL but the INSERT does not set these.
I fixed the problem by changing the INSERT in aggregator_module to the following...
INSERT INTO {aggregator_feed} (fid, title, url, refresh, block, description, image) VALUES (%d, '%s', '%s', %d, 5, '', '')
This is really not a complicated issue, why can't you guys fix this?
As it seems, this bug has been around since v4.7.
Can you tell me how long it will take the Drupal team to fix this ?
Another year? Come on guys, it's not that complicated.
Thank you,
Jurgen
Comment #8
Memeshift CreditAttribution: Memeshift commentedWe tried this solution on our install and it worked! Thank you!
morgan
Comment #9
EyalSch CreditAttribution: EyalSch commentedThank you !!!
Eyal
Comment #10
kirikintha CreditAttribution: kirikintha commentedI had to disable the NOT NULL on images and description to get this to work. This should be changed in Core.
Comment #11
mchrisneglia CreditAttribution: mchrisneglia commentedIt's possible this particular issue is addressed at stack overflow and may be what's plaguing drupal module developers and end users:
http://stackoverflow.com/questions/266431/empty-string-in-not-null-colum...
I could be wrong. As we migrate drupal sites off a host, this crops up and yes it is a pain. Obviously, no one is doing this intentionally or overlooking / not checking or testing their code. It's probably an issue specific to a default setup of a specific version of mysql and/or php. At any rate, it would be nice to never see this kind of issue again, to have a bullet proof way of testing a DB config prior to installing the db table schema so that it works correctly. I'll be looking into it since i have to have this working. Unfortunately on some sites i can't upgrate to drupal 6x or 7x yet.