I have just upgraded my drupal site from 6.5 to 6.6. For some content types I had created a fivestar field displaying my vote of the thing the content is about (movie, book). This field is not displayed and when I go to admin/content/types to manage the fields, there also no fivestar field displayed (field_vote). However, when I try to create a field with the same name (field_vote) I get the message that this field already exists.

I really don't know how to solve this problem and would appreciate any help. Please let me know if I should provide more information.

CommentFileSizeAuthor
#7 fivestar_d6_enable.patch953 bytesquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moonwatcher’s picture

Category: support » bug

Maybe I should describe the problem more extensively:

On my blog (http://www.moviephil.de) I post movie reviews regularly. I created a field (label="Meine Wertung" field name=field_vote) to rate the movie I review. After the upgrade the field is not displayed, neither in the already published entries nor in the admin section of the content types. However, I can create a fivestar field and add it to the respective content type and the field is displayed. This means that fivestar is generally working. But adding a new field is not a solution I prefer because that would mean that I have to edit every entry, adding information that already exists. The information has to be there: I get the message that the field already exists when I try to add a fivestar field with the label "Meine Wertung" and the name field_vote.

My question is: What can be done to make the already existing field and information visible again?

quicksketch’s picture

I've seen this sort of thing before, though I'm not certain where it comes from. The Fivestar field and its data are still there, but CCK has disabled the field and widget.

The work-around I've done is to open up the database and change the following information:

- In the table "content_node_field" set the "active" column to 1 for the Fivestar field.
- In the table "content_node_field_instance" set the "widget_active" column to 1 for the Fivestar field instance.

Let me know if this looks like the scenario you're experiencing, as it could be a larger issue either with Fivestar or CCK.

moonwatcher’s picture

Yes, the workaround delivers the desired results, the field is visible again. Thanks very much, I already suspected that this issue might be solved by manipulating the database. I wonder why this happens. Incidentally, on my localhost the problem did not occur when I upgraded to 6.6. However, this might be due to the fact that I did not deactivate the additional modules which I did on my other installation.

quicksketch’s picture

Thanks. Yeah I think you may be right about the order of upgrades. Contrib modules get very little control over which modules get updated first, so it might have been a problem with Fivestar updating before (or after) CCK, ending up with it's field in a disabled state. However, I haven't seen this during every upgrade, just some, so it's a difficult problem to work with.

xqi’s picture

I experienced the same problem when I upgrade my drupal 5.x to 6.x. quicksketch's solution fixed it. i think it has something to do with cck's upgrade.

hellaswebnews’s picture

I am new to phpadmin and I am wondering as to how to achieve what is being described here.

www.hellaswebnews.com {no stars shown on any articles}

quicksketch’s picture

Status: Active » Fixed
FileSize
953 bytes

Okay I finally found the solution to this. Fivestar needs to explicitly tell CCK to re-enable all the Fivestar fields. I've committed the attached patch which adds a new update function to Fivestar which should enable Fivestar fields automatically on upgrade.

doomed’s picture

This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled.

I got this same problem after upgrading from D6.9 to D6.10 .

I'm sure i disabled every non-core module before the upgrade.

But when enabling them back (after the succesful upgrade) i did all at once, which may not be the best of ideas.

Anyway this workaround fixed it for me.

Status: Fixed » Closed (fixed)

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

emackn’s picture

patch worked for me

Rhino’s picture

When applying the patch that is supplied above and seemed to help everyone else I get;

Fatal error: Cannot redeclare fivestar_update_6105() (previously declared in /var/www/drupal/sites/default/modules/fivestar/fivestar.module:1725) in /var/www/drupal/sites/default/modules/fivestar/fivestar.install on line 217

However, I'm on Drupal 6.11 so perhaps there are other reasons for my fivestar not working. There is for example, no fivestar mentioned in content_node_field to enable straight in mysql. I'm lost.

afagioli’s picture

From my experience here, first thing to do is:
"Be sure you run update.php [maybe 6001] for relative cck module"