Closed (won't fix)
Project:
Fivestar
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2010 at 17:36 UTC
Updated:
4 Mar 2014 at 08:09 UTC
Jump to comment: Most recent
Comments
Comment #1
gregarios commentedExamining 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.
Comment #2
Anonymous (not verified) commentedPlease provide more details so others can try to replicate.
See How to make an issue report for guidelines.
Comment #3
gregarios commentedThat 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.
Comment #4
ajs17 commentedJust 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.
Comment #5
gregarios commentedNice 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.
Comment #6
ericduran commentedI'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 :)
Comment #7
ericduran commentedAlso this will be fixed in fivestar 6.x-2.x is not feasible to maintain 3 different branches.
Comment #8
whiteph commentedWe 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.
Comment #9
whiteph commentedSee Help testing Drupal 6 patches.