For some reason, if I make a CCK superheadline text field and have it included in my page.tpl.php file, I cannot show the Fivestar stars below the content or teaser body. It appears above the body text no matter what I set the settings to do. And, this happens only for blog nodes. Any ideas?

Comments

gregarios’s picture

Examining the variables data for the Fivestar module, all the variables seem to have the correct settings in the database, too. Still shows the same result: Fivestars are at the beginning of the node body every time in blog nodes & teasers. Regular story nodes appear just fine.

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide more details so others can try to replicate.
See How to make an issue report for guidelines.

gregarios’s picture

Please provide more details so others can try to replicate.

That is all the details I have, since my post was nearly a year ago. At this point, you might as well leave this as "postponed" until someone else experiences the issue unless you can specify what details you want me to find.

ajs17’s picture

Just experienced these symptoms myself for the first time today, using Drupal 6.20, and Fivestar 6.x-1.19. Although in the custom content type editing screen I configured Fivestar to display below the node body, and it updates the database properly, it displays above the node body.

Like many things in Drupal, the Fivestar module determines its display position based on weight. So, if you look at the fivestar.module file, at the fivestar_nodeapi() method, on line 935, you will see that if the position is configured to be above the node body, a -10 weight is applied, and if the position is configured to be below the node body, a weight of 50 is applied:

'#weight' => $position == 'above' ? -10 : 50,

Now, if you re-order fields for your content type on the 'manage fields' screen, in the background, Drupal may assign weights outside this range. This is what happened to me: I created a few new CCK fields, moved them to the top of the list of fields, and behind the scenes, Drupal assigned weights starting at 100--so the Fivestar widget floats to the top.

The easiest solution seemed to be the stupidest in this case. I turned off Javascript temporarily in my browser and reloaded the 'manage fields' screen, which exposes text fields for the weights. Edit these to be below 50, and save, and you should see things working as expected.

So ultimately, maybe the line above should do something like this:

'#weight' => $position == 'above' ? -1000 : 1000,

?

Hope this helps someone.

gregarios’s picture

Title: Fivestar Ratings appear above body no matter the settings » Fivestar Ratings appear above body no matter the settings (Maintainer: solution found please update!)
Status: Postponed (maintainer needs more info) » Active

Nice sleuthing ajs17! I recommend that the maintainers make the change to the module. The correct maximum range needs to be assessed, and then these numbers set at the actual limit for the setting to work most reliably in my opinion.

I've had to put off adding several CCK fields because I couldn't figure out why every time I added one, the stars would misplace to the top.

ericduran’s picture

Status: Active » Reviewed & tested by the community

I'm curious if we really need to go that hight. I completely understand the problem, Just thinking here.

Also patches are always welcome ;-) even for tiny changes. Is just easier to apply :)

ericduran’s picture

Version: 6.x-1.19 » 6.x-2.x-dev

Also this will be fixed in fivestar 6.x-2.x is not feasible to maintain 3 different branches.

whiteph’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (won't fix)

We can no longer support the Drupal 6 version of Fivestar. It is in security maintenance mode only. When the Drupal 8 version of Fivestar is released, the Drupal 6 version will be officially deprecated.

whiteph’s picture