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.
# Summary
This module provides flexible voting widgets for nodes and comments.
# Project URL
https://www.drupal.org/project/rate
# Where is the code?
https://cgit.drupalcode.org/rate
# Estimated completion date
Unknown
# Dependencies
- Voting API is used for storage of voting results.
# Who's doing the port?
# What help do they need?
None for the moment.
# D8 roadmap
https://www.drupal.org/node/1843902
# Background and reference information
Unknown
Comment | File | Size | Author |
---|---|---|---|
#9 | NickNameVoted.png | 15.18 KB | Boymix81 |
#9 | Relationship.png | 44.76 KB | Boymix81 |
Comments
Comment #2
pedrorocha CreditAttribution: pedrorocha commentedVoting API module already has an alpha version(https://www.drupal.org/node/2721819) and months of use in production, so it's stable, despite still open to feedback, feature suggestions and API changes.
If Rate 8.x is going to use it, is a good time to discuss.
Comment #3
brenk28 CreditAttribution: brenk28 commentedI started a D8 port here: https://github.com/brenk/rate It uses VotingAPI and currently borrowing from https://www.drupal.org/project/like_and_dislike to get started.
Comment #4
jhedstromChanging status since a port is under way.
Comment #5
jhedstromComment #6
Stephen OllmanJust installed the D8 Rate module from #3
Feedback so far.
1. Whilst a node shows the thumbs up / thumbs down, when I select one of them nothing happens.
2. When I select the associated 'Undo' link I get the following error when AJAX is enabled.
Uncaught AjaxError:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /rate/undo/node/1?destination=/sample-page
StatusText: OK
ResponseText:
________________________ AND WHEN NOT ENABLED____________________
[Wed Sep 07 17:02:59.831121 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: Recoverable fatal error: Argument 1 passed to Drupal\\rate\\RateBotDetector::__construct() must be an instance of Drupal\\rate\\ConfigFactoryInterface, instance of Drupal\\Core\\Config\\ConfigFactory given, called in /docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 280 and defined in /docroot/modules/rate/src/RateBotDetector.php on line 69 #0 /docroot/core/includes/bootstrap.inc(546): _drupal_error_handler_real(4096, 'Argument 1 pass...', '/Users/Stephen/...', 69, Array), referer: /sample-page
[Wed Sep 07 17:02:59.831249 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #1 /docroot/modules/rate/src/RateBotDetector.php(69): _drupal_error_handler(4096, 'Argument 1 pass...', '/Users/Stephen/...', 69, Array), referer: /sample-page
[Wed Sep 07 17:02:59.831269 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #2 /docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(280): Drupal\\rate\\RateBotDetector->__construct(Object(Drupal\\Core\\Config\\ConfigFactory), Object(Drupal\\Core\\Database\\Driver\\mysql\\Connection), Object(GuzzleHttp\\Client), Object(Symfony\\Component\\HttpFoundation\\RequestStack)), referer: /sample-page
[Wed Sep 07 17:02:59.831281 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #3 /docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'rate.bot_detect...'), referer: /sample-page
[Wed Sep 07 17:02:59.831302 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #4 /docroot/modules/rate/src/Controller/VoteController.php(119): Drupal\\Component\\DependencyInjection\\Container->get('rate.bot_detect...'), referer: /sample-page
[Wed Sep 07 17:02:59.831313 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #5 /docroot/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\\rate\\Controller\\VoteController::create(Object(Drupal\\Core\\DependencyInjection\\Container)), referer: /sample-page
[Wed Sep 07 17:02:59.831321 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #6 /docroot/core/lib/Drupal/Core/Controller/ControllerResolver.php(123): Drupal\\Core\\DependencyInjection\\ClassResolver->getInstanceFromDefinition('Drupal\\\\rate\\\\Con...'), referer: /sample-page
[Wed Sep 07 17:02:59.831363 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #7 /docroot/core/lib/Drupal/Core/Controller/ControllerResolver.php(74): Drupal\\Core\\Controller\\ControllerResolver->createController('Drupal\\\\rate\\\\Con...'), referer: /sample-page
[Wed Sep 07 17:02:59.831373 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #8 /docroot/core/lib/Drupal/Core/Controller/ControllerResolver.php(91): Drupal\\Core\\Controller\\ControllerResolver->getControllerFromDefinition('Drupal\\\\rate\\\\Con...', '/rate/undo/node...'), referer: /sample-page
[Wed Sep 07 17:02:59.831379 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #9 /docroot/vendor/symfony/http-kernel/HttpKernel.php(127): Drupal\\Core\\Controller\\ControllerResolver->getController(Object(Symfony\\Component\\HttpFoundation\\Request)), referer: /sample-page
[Wed Sep 07 17:02:59.831384 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #10 /docroot/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1), referer: /sample-page
[Wed Sep 07 17:02:59.831390 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #11 /docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true), referer: /sample-page
[Wed Sep 07 17:02:59.831395 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #12 /docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true), referer: /sample-page
[Wed Sep 07 17:02:59.831401 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #13 /docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true), referer: /sample-page
[Wed Sep 07 17:02:59.831406 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #14 /docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true), referer: /sample-page
[Wed Sep 07 17:02:59.831412 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #15 /docroot/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true), referer: /sample-page
[Wed Sep 07 17:02:59.831424 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #16 /docroot/core/lib/Drupal/Core/DrupalKernel.php(649): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true), referer: /sample-page
[Wed Sep 07 17:02:59.831430 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #17 /docroot/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request)), referer: /sample-page
[Wed Sep 07 17:02:59.831434 2016] [fcgid:warn] [pid 2318:tid 2986405888] [client 127.0.0.1:61031] mod_fcgid: stderr: #18 {main}, referer: /sample-page
3. On the 'Manage Display' page I can only show and hide the 'Rate Vote Widget', there is no other configuration available.
4. On the 'Rate settings' page I do not see any Node Display options, only content type, which I've selected.
So at the moment all I'm getting from the D8 module is a 0% TU 0% TD with an 'Undo' link on a node page, with no functionality happening.
What did I miss?
Comment #7
Boymix81 CreditAttribution: Boymix81 as a volunteer commentedHi,
for me widget Fivestar doesn't work.
I think discovered the bug, a wrong link to give the vote in the rate-template-fivestar.html.twig file. In the code ( rate.module ) I find star_link insted of vote_url , I substitute it and now for me it works.
Bye Boymix81.
Comment #8
Boymix81 CreditAttribution: Boymix81 as a volunteer commentedHi,
I configure "Voting API" module "Widget Type" with "Fivestar" type.
I select "User" like "Entity types with Rate widgets enabled" configuration and users could be voted by other users in their profiles (added "Rate Vote Widget" field).
I added votes from different users to other users but from the "Rate Voting Results" and "Rate Voting Summary" I have an empty result.
I analyse the view "Rate Voting Results" but I not to be able to find the way to get voted of users. The "Voted entity" always is "Content" why I cannot select "User" ?
I also try to show the field starting from "User" entity in a new "View" (Example List of users) but I non find the "Rate Vote Widget" field.
Could you help me, please ? I'm a newbe of Drupal.
Thank you.
Best Regards.
Bye Boymix81.
Comment #9
Boymix81 CreditAttribution: Boymix81 as a volunteer commentedHi,
to solve the problem talked in the post before, I use the following hook :
Do you think it is a good solution ?
Now I have the list of Users voted and votes .
Thank you.
Best Regards.
Boymix81.
Comment #10
Boymix81 CreditAttribution: Boymix81 as a volunteer commentedHi,
for me with "Widget Type" "Fivestar" the value setted is wrong because the value always is 1 for star1 , star2 , star3 , star4, star5 types .
I fixed this, I modify this Drupal\rate\RateVote class
Now for example I voted users, I gave star5 to Boymix81 , star4 to Test2FR and star3 to Test4IT and I created a view NickName Classification with Numbers of vote and Average of Values (I also used the relationship like telled in my last post)
Fields
(User Voted) User: Name (NickName Voted)
COUNT(Vote: Value) (N.)
AVG(Vote: Value) (Value)
Sort criteria
AVG(Vote: Value) (desc)
and now I have the correct list.
NickName Voted N. Value
Boymix81 1 5
Test2FR 1 4
Test4IT 1 3
Bye Boymix81.
Comment #11
kevin.dutra CreditAttribution: kevin.dutra at Workday, Inc. commentedComment #12
lamp5Comment #13
apaderno