Fivestars clicking does not work. Console error Uncaught TypeError: $this_star.prevAll(...).andSelf is not a function in fivestar.js.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

_gradient_ created an issue. See original summary.

_gradient_’s picture

andSelf() is replaced in jQuery3 with addBack().

_gradient_’s picture

Title: Uncaught TypeError: $this_star.prevAll(...).andSelf is not a function » No click operations on the fivestar
_gradient_’s picture

Title: No click operations on the fivestar » No click operations on the star
sorabh.v6’s picture

Status: Active » Reviewed & tested by the community

I can confirm that the patch in #2 is working for me fine. Therefore, setting it to RTBC.

Thanks

Mitriy-Bug’s picture

After upgrading to Drupal 8.4.2 stopped working buttons select the rating. Turned out to be a bug in jquery version v. 3.2.1 in the kernel. Manually installed the v2 version.2.4 and it worked.

Gildart’s picture

Hi
I am in D8.4.4 and applied the patch but it is still not working.
I can select the stars, the stars stay selected but nothing is saved in the database when the page is reloaded...
Thanks
gildart

rferguson’s picture

Same here, on 8.3.7 though. Clicking the stars does nothing to save it. There's no console/network activity either.

icurk’s picture

The patch is working for me on Drupal 8.4.4.

rferguson’s picture

I just updated to 8.4.4. Still not persisting to the DB. It looks like the fivestar.js file doesn't have any code in it to actually call the saving of the option. It seems like there should be something within fivestar.rate.

icurk, when you choose a star, then reload, are you seeing the choice you've selected appear? Right now nothing is saved against the DB for me.

Pancho’s picture

Issue tags: +jQuery

Closed #2927390: Drupal 8.4.2 - jquery v. 3.2.1 as a duplicate of this issue.

dbjpanda’s picture

Works for me. Thanks

init90’s picture

Status: Reviewed & tested by the community » Fixed

The patch already included in the dev version of the module. Thanks, everyone!

Status: Fixed » Closed (fixed)

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