Hello there.
First off, thanks for putting energy into a project that benefits others.
I am testing the Pollfield module for use in one of our sites, and am getting the following error:
user warning: Invalid default value for 'field_[fieldname]_anonymous' query: ALTER TABLE content_type_story ADD `field_[fieldname]_anonymous` INT DEFAULT '' '' in /usr/share/drupal6/includes/database.mysql-common.inc on line 298.
I'm testing on a bare-bones Drupal 6.14 site, with only Pollfield and CCK - Content modules enabled -- well, besides Administration menu, Advanced help, and Backup and Migrate, all latest versions as of 10/27/09.
- Setup:
- Pollfield 6.x-1.7-beta1
- Drupal 6.14
- Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch Server
- MySQL Server version: 5.0.75-0ubuntu10.2
- MySQL client version: 5.0.75
I searched drupal.org for this kind of error message, found: http://drupal.org/node/198502
Any help with this greatly appreciated...
Thank you,
-Byron
Comments
Comment #1
byronveale commentedAnother error when deleting Pollfield content:
This is in addition to the original error generated when creating a content type with a Pollfield field. As a means of clarifying, not only did I get that original error message, but kept getting it or some variation when trying to create a view with Pollfield content. And while I could accept some stray error messages while developing, the page I created had some very public errors, which led me to post this request...
Thanks again,
-Byron
Comment #2
mario_prkos commentedHi!
Thanks for encouragement I glad that you find this module userfull. As I can see this issue is something with CCK tables. This module is testing only for recommended version of CCK. I tested on different kind of circumstances. I use almost the same installation for testing (I use CCK 2.5) and didn't find any problem of that type.
If you need any help be free to contact me.
Mario
Comment #3
byronveale commentedThanks for replying so quickly...
I'm also using CCK 2.5.
The module installs fine.
On my first go-around (on an intranet-site), I created a new content type, and immediately after I created a pollfield field, I got the "Invalid default value..." error (while on the page to edit the field properties).
After creating and publishing a view (using the Views module, sorry if I'm stating the obvious) with some content, I tested the page as an unregistered visitor, and got this error:
When I deleted the content out of that site, I got the "Can't DROP..." error.
I then tried on another site that's totally bare-bones (the specs I entered above), and again got the same errors.
Thanks again!
Comment #4
mario_prkos commentedHi,
I find problem it is stupid but annoying one.Problem is in wrong type of anonymous field. It should be "text" not "int".
Solution:
Change line
$columns['anonymous'] = array('type' => 'int', 'default' => "' '", 'sortable' => TRUE,'views' => TRUE);
with
$columns['anonymous'] = array('type' => 'text', 'default' => "' '", 'sortable' => TRUE,'views' => TRUE);
It works form me. I hope it will work for you. I hope this was not causing to much problem.
Comment #5
byronveale commentedTHANK YOU!
Yes, that worked.
I believe I'll be able to use your module for our content -- I'm also looking at Webform. One function that Webform has that I haven't been able to find elsewhere is the ability to have mandatory fields for gathering user contact information. Our poll is to be part of a contest where a participant will be randomly selected to receive a prize. So we need to be able to capture e-mail addresses, in order to select the winner, and to notify them that they have won.
I'm new to Drupal, and so am wondering if I'm missing something basic. There are a bunch of CCK modules for things like e-mail fields, addresses, phone numbers, and the like, but they all seem to be for creating content, and not for gathering content from site visitors. You wouldn't happen to know how to address this sort of need, would you?
Thank you again for your assistance. I suppose a new dev version of Pollfield will be coming...?
Comment #6
mario_prkos commentedYes, you are right most of CCK modules is designed to be extension of ordinary content type like story, page, forum etc. Most of them is entered when you create new content. Of course you can build CCK module which can take user's inputs after content is being created (pollfield is one of them; you can collect user's votes after poll is created). Webform is very good module to collects user inputs but it lacks of CCK flexibility and modularity. You can combine for example webform with other CCK modules. But you have to figure out how to combine data from those different modules. This is issue I think a lot last days and probably many other developers and Drupalers. I think of somekind of integration with webform through views as the one of the option of pollfield. Also, I will be glad to hear form you what is good side and bad side of using webform or any kind of forms in Drupal you use? What is main problem you want to be solved about this issue?
If have any question free contact me!
Comment #7
byronveale commentedWebform good:- can easily build a custom form, and have all that user-entered data go into your database
- can easily specify required fields for forms, such as e-mail address or other contact info (very useful)
Webform not-so-good:- can't easily give feedback to users, especially non-registered users -- you can give feedback, but it's the same sort of feedback an admin gets, namely user info, IP addresses, etc.
- seems to use the older-style approach to Drupal and modules, where nowadays, CCK and Views are the things to use
I'd like to be able to create a custom form, in this case collecting info on books people enjoy, offer it to unregistered users, give users who want to be entered in a contest a place to enter contact info, and be able to display the results to any visitor to the site. Webform is close in functionality, but the all-or-nothing approach to feedback leads me to believe I'll have to try hacking a node-webform.tpl.php to provide results feedback that doesn't disclose private information about our site visiters!
Pollfield is great, in that it takes the basic Poll module, and translates it into the CCK/Views world, which offers greater flexibility in presenting the content.
I guess I need something like a "user-email-field" module
Thanks again for taking the time.
P.S. So far as an update to the dev version of Pollfield, is that something you have to do? Or can I take my updated version (I know, it's an update of about four characters!) and somehow upload it to the project page?
Comment #8
mario_prkos commentedYou can use dev version safely on your project page for now there is only fixes and there are no new features. I will also tomorrow release new recommended version with all those bug fixes. Manly I every week release new recommended version which contain bug fixes from version before and maybe new features. New features is in dev version for about week or two after it is tested for while before it is moved to recommended version. This small update is included in dev version. Basicly every fix I do for people (sometime is small) will be put in dev version and at the end of the week in recommended version. Only if there is serious bug or security problem new recommended release is going immediately. That is the way pollfield grow.
Thank you for your replay. User feedback make my job easier it gives valuable information how to proceed.
Comment #9
byronveale commentedThanks for the info, I'll be sure to look for the updates. And I think I'll be using Pollfield for the initial go-around of our site, where we won't need to collect any info. I'll send you a link once the site is public.
Who knows, maybe by the time we're ready to have the contest (January or so), there will be a module or two available that I can use to create what we're looking for...
Comment #10
mario_prkos commentedI am working now that pollfield include additional infos (just as I write to you). Also, I want to combine more pollfield polls in one complex poll with one vote button. Basically, to expand module to do stuff more modularly and easy as possible with maximally use of CCK an Views capabilities. I will published first things next week you can check out and told how do you like it. I will appreciate to take some tips and advices from you.
I looking forward to see site online and best wishes for your project.
Comment #11
dddave commentedcleaning up...