I have created content type with pollfield.
When I trying to save post I'm getting

•user warning: BLOB/TEXT column 'field_gm_time_question' can't have a default value query: CREATE TABLE content_field_gm_time ( `vid` INT unsigned NOT NULL DEFAULT 0, `nid` INT unsigned NOT NULL DEFAULT 0, `delta` INT unsigned NOT NULL DEFAULT 0, `field_gm_time_question` TEXT DEFAULT '' '', `field_gm_time_active` INT DEFAULT 0, `field_gm_time_runtime` INT DEFAULT 0, `field_gm_time_choice` TEXT DEFAULT '' '', `field_gm_time_votes` INT DEFAULT 0, `field_gm_time_anonymous` TEXT DEFAULT '' '', PRIMARY KEY (vid, delta), INDEX nid (nid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in W:\WEB\htdocs\includes\database.inc on line 517.
•user warning: Table 'drupal.content_field_gm_time' doesn't exist query: INSERT INTO content_field_gm_time (vid, nid, delta, field_gm_time_question, field_gm_time_active, field_gm_time_runtime, field_gm_time_choice, field_gm_time_votes, field_gm_time_anonymous) SELECT vid, nid, 0, field_gm_time_question, field_gm_time_active, field_gm_time_runtime, field_gm_time_choice, field_gm_time_votes, field_gm_time_anonymous FROM content_type_gm_meeting_poll in W:\WEB\htdocs\sites\all\modules\cck\includes\content.admin.inc on line 1537.
•user warning: Can't DROP 'field_gm_time_question'; check that column/key exists query: ALTER TABLE content_type_gm_meeting_poll DROP field_gm_time_question in W:\WEB\htdocs\includes\database.mysql-common.inc on line 322.
•user warning: Can't DROP 'field_gm_time_choice'; check that column/key exists query: ALTER TABLE content_type_gm_meeting_poll DROP field_gm_time_choice in W:\WEB\htdocs\includes\database.mysql-common.inc on line 322.
•user warning: Can't DROP 'field_gm_time_anonymous'; check that column/key exists query: ALTER TABLE content_type_gm_meeting_poll DROP field_gm_time_anonymous in W:\WEB\htdocs\includes\database.mysql-common.inc on line 322.
•user warning: BLOB/TEXT column 'field_gm_time_question' can't have a default value query: CREATE TABLE content_field_gm_time ( `vid` INT unsigned NOT NULL DEFAULT 0, `nid` INT unsigned NOT NULL DEFAULT 0, `delta` INT unsigned NOT NULL DEFAULT 0, `field_gm_time_question` TEXT DEFAULT '' '', `field_gm_time_active` INT DEFAULT 0, `field_gm_time_runtime` INT DEFAULT 0, `field_gm_time_choice` TEXT DEFAULT '' '', `field_gm_time_votes` INT DEFAULT 0, `field_gm_time_anonymous` TEXT DEFAULT '' '', PRIMARY KEY (vid, delta), INDEX nid (nid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in W:\WEB\htdocs\includes\database.inc on line 517.
CommentFileSizeAuthor
#4 content_type_gm_poll.sql_.zip626 bytesEther

Comments

mario_prkos’s picture

Version: 6.x-1.1-beta1 » 6.x-1.2-beta1

It seems that there is problem with cck content type; try to recreate content type (delete field and create again); can you please post more information about your content type so I can produce your problem.

Ether’s picture

Version: 6.x-1.2-beta1 » 6.x-1.x-dev

I have created content type gm_poll.
When adding pollfield getting errors:

•user warning: BLOB/TEXT column 'field_poll_question' can't have a default value query: ALTER TABLE content_type_gm_poll ADD `field_poll_question` TEXT DEFAULT '' '' in W:\WEB\htdocs\includes\database.mysql-common.inc on line 298.
•user warning: BLOB/TEXT column 'field_poll_choice' can't have a default value query: ALTER TABLE content_type_gm_poll ADD `field_poll_choice` TEXT DEFAULT '' '' in W:\WEB\htdocs\includes\database.mysql-common.inc on line 298.
•user warning: BLOB/TEXT column 'field_poll_anonymous' can't have a default value query: ALTER TABLE content_type_gm_poll ADD `field_poll_anonymous` TEXT DEFAULT '' '' in W:\WEB\htdocs\includes\database.mysql-common.inc on line 298
mario_prkos’s picture

Can you please post me what kind of drupal version you use and what kind of pollfield version. It seem that your problem lies that in table content_type_gm_poll default value can not be written. I am not sure why is so because I didn't able to reproduce your problem. Does you have this message every time your create content gm_poll or when you create a content type. From your post I can see that drupal changed the table and add default value with query ALTER TABLE content_type_gm_poll ADD `field_poll_anonymous` TEXT DEFAULT '' ''. Can you sand me table information using some of database tool like MySQL Query Browser or PhpMyadmin.

Ether’s picture

StatusFileSize
new626 bytes

I'm using Drupal 6.13, MySql and PHP 5, and last dev version of Pollfield (I had the same problem with beta versions).
I have last message when I create content type gm_poll.Message from my original post I getting when I create gm_poll content. Also, I should say that I can not save any info in the pollfield when creating gm_poll content. When I open it to edit Poll section is empty.
Please find table attached.
Also, when I delete gm_poll content type I getting errors:

•user warning: Can't DROP 'field_gm_poll_question'; check that column/key exists query: ALTER TABLE content_type_gm_poll DROP field_gm_poll_question in W:\WEB\htdocs\includes\database.mysql-common.inc on line 322.
•user warning: Can't DROP 'field_gm_poll_choice'; check that column/key exists query: ALTER TABLE content_type_gm_poll DROP field_gm_poll_choice in W:\WEB\htdocs\includes\database.mysql-common.inc on line 322.
•user warning: Can't DROP 'field_gm_poll_anonymous'; check that column/key exists query: ALTER TABLE content_type_gm_poll DROP field_gm_poll_anonymous in W:\WEB\htdocs\includes\database.mysql-common.inc on line 322
mario_prkos’s picture

--
-- Definition of table `drupal_ucenje`.`content_field_poll`
--

DROP TABLE IF EXISTS `drupal_ucenje`.`content_field_poll`;
CREATE TABLE `drupal_ucenje`.`content_field_poll` (
`vid` int(10) unsigned NOT NULL default '0',
`nid` int(10) unsigned NOT NULL default '0',
`field_poll_question` text,
`field_poll_active` int(11) default '0',
`field_poll_runtime` int(11) default '0',
`field_poll_choice` text,
`field_poll_votes` int(11) default '0',
`field_poll_anonymous` text,
PRIMARY KEY (`vid`),
KEY `nid` (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

that is what I have on my drupal 6.12 and latest pollfield installation and from your post I can see that contet_type table is not build correct. If you dont have to much content you can try to:

  1. delete gm_poll content
  2. disable pollfield,
  3. unistall pollfield,
  4. install pollfield again
  5. create content again
  6. add pollfield to content type
  7. try it if it works

If you have much of content you can manually add missing fileds. I also tried on 6.13 Drupal installation and didn't find any problems.
Did you have any previous installation of Pollfield or you just installed latest one. What version of CCK you use?

Ether’s picture

Thanks.
By some reason all fields with type "text" was not created. Reinstalliation did not help.
Unfortunatly was not able to to something manually.
I'm using last dev version of CCK.

mario_prkos’s picture

I didn't test Pollfield with last dev of CCK, module is tested with 6.2x. What new features from dev CCK do you use?Can you downgrade to recommended version.

mario_prkos’s picture

Status: Active » Closed (fixed)

closed dev version of CCK is not supported only recommended one

delykj’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

This bug present with the latest pollfield and latest official CCK 6.x-2.8.
Any idea how to fix this?
Changed priority because this module is nonfunctional without a fix.

bryan kennedy’s picture

Status: Active » Closed (cannot reproduce)

The latest version of this module with the latest version of CCK and Drupal (6) doesn't present this error. So I am closing as can't reproduce.

alexaki’s picture

Version: 6.x-1.x-dev » 6.x-1.13-beta1

When I try to create a content type (poll_multiple) with a pollfield the following error is reported
(system: pollfield 6.x-1.13-beta1, cck-6.x-2.9, drupal 6.20, mysql 5.0.67)

user warning: BLOB/TEXT column 'field_quest_question' can't have a default value query: ALTER TABLE content_type_poll_multiple ADD `field_quest_question` TEXT DEFAULT '' '' in www\includes\database.mysql-common.inc on line 307.
user warning: BLOB/TEXT column 'field_quest_choice' can't have a default value query: ALTER TABLE content_type_poll_multiple ADD `field_quest_choice` TEXT DEFAULT '' '' in www\includes\database.mysql-common.inc on line 307.
user warning: BLOB/TEXT column 'field_quest_anonymous' can't have a default value query: ALTER TABLE content_type_poll_multiple ADD `field_quest_anonymous` TEXT DEFAULT '' '' in \www\includes\database.mysql-common.inc on line 307.
user warning: BLOB/TEXT column 'field_quest_poll_features' can't have a default value query: ALTER TABLE content_type_poll_multiple ADD `field_quest_poll_features` TEXT DEFAULT '' '' in www\includes\database.mysql-common.inc on line 307.

The problem seems to be that mysql doesn't support DEFAULT values for BLOB and TEXT columns