Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Because the id's from the fivestar form are (as per drupal default) unique per page, using fivestar with views and the "Load More" module created a situation where the same id was given multiple times
a simple fix to this is the following:
in fivestar.module function fivestar_expand() add the #id element to the 'vote' object:
$element['vote'] = array(
'#type' => 'select',
'#options' => $options,
'#required' => $element['#required'],
'#theme' => 'fivestar_select',
'#id' => 'edit-vote--'.uniqid(),
'#default_value' => _fivestar_get_element_default_value($element),
);
Comment | File | Size | Author |
---|---|---|---|
#5 | 1976496-Fivestar_with_Views_and_Load_more_not_working-5.patch | 524 bytes | dbt102 |
| |||
#3 | 1976496-Fivestar_with_Views_and_Load_more_not_working-3.patch | 1.72 KB | dbt102 |
Comments
Comment #1
omaster CreditAttribution: omaster commentedWow this should be committed to the fivestar module. It doesn't appear to do any harm but fixes it.
Comment #2
joelpittetThe status should be active since there is no patch and patch to be ported means back or forward porting from a different branch
Comment #3
dbt102 CreditAttribution: dbt102 at Pineshore for Smoky Mountain Institute, BACnet Interest Group - Drupal commentedComment #5
dbt102 CreditAttribution: dbt102 at Pineshore for Smoky Mountain Institute, BACnet Interest Group - Drupal commented