There seem to be a number of issues with CCK and Fivestar at the moment, I guess cos CCK is in quite a fluid state too, but I got this error while creating fivestar fields:

    * user warning: Invalid default value for 'field_test_target' query: ALTER TABLE content_type_organisation ADD `field_test_target` INT DEFAULT 'NULL' in D:\muun_nobackup\korporatekarma\www\includes\database.mysql-common.inc on line 298.
    * user warning: Invalid default value for 'field_test_rating' query: ALTER TABLE content_type_organisation ADD `field_test_rating` INT DEFAULT 'NULL' in D:\muun_nobackup\korporatekarma\www\includes\database.mysql-common.inc on line 298.

Seems lines 75 and 76 of fivestar_field.inc should be changed from:

<?php
       
'target' => array('type' => 'int', 'default' => 'NULL'),
       
'rating' => array('type' => 'int', 'default' => 'NULL'),
?>

to:

<?php
       
'target' => array('type' => 'int', 'default' => NULL),
       
'rating' => array('type' => 'int', 'default' => NULL),
?>

This got rid of the error, but it still didn't work, so I guess there are other problems - I don't have time to debug further right now, but maybe someone else can pick this up? =)

Files: 

Comments

quicksketch’s picture

Title:NULL queries cause error when creating CCK fields» Upgrade Fivestar's CCK Support for 6
Category:bug» task

Yeah, Fivestar's CCK implementation hasn't yet been updated for the new API. I'd be surprised if it works at all. I'd appreciate any help you could lend in getting this ported.

greg.harvey’s picture

Hi,

At the moment I have *no* free time, but I might be able to help in a few weeks if it's still an open issue. I'll keep you posted. =)

quicksketch’s picture

Status:Active» Needs work
StatusFileSize
new6.97 KB

I was trying to get this working before releasing 1.12, but looks like Drupal 6 will just have to get a 1.12 beta version. The attached patch starts the process but it's not complete (nor working what-so-ever).

quicksketch’s picture

Status:Needs work» Fixed
StatusFileSize
new11.64 KB

Finished up the port today. Time for a real release for Drupal 6!

Anonymous’s picture

Status:Fixed» Closed (fixed)

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