Problem/Motivation
Are you planning on a D10 release?
I was just testing the great module (thank you) after simply having added || ^10 in the info.yml
The errors I encountered were:
- After creating a Vote type and enabling it on Article nodes at the settings, everytime I try to go back to edit the Vote type:
Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck(). in Drupal\Core\Entity\Query\Sql\Query->prepare() (line 141 of /var/www/html/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php) - When viewing an Article node:
Warning: Undefined array key "vote_average" in Drupal\vote\Plugin\VoteBaseType\VoteBaseTypeRatherYesNo->getResultString() (line 41 of modules/contrib/vote/src/Plugin/VoteBaseType/VoteBaseTypeRatherYesNo.php). Deprecated function: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in Drupal\vote\Plugin\VoteBaseType\VoteBaseTypeRatherYesNo->getResultString() (line 41 of modules/contrib/vote/src/Plugin/VoteBaseType/VoteBaseTypeRatherYesNo.php)
Error 2 goes away after saving the Article's Manage display, even without changing anything, so the voting widget appears and voting works, but unfortunately Error 1 stays
Steps to reproduce
- Clean install of Drupal 10.0.9 (from DDEV CMS Quickstart), with MariaDB and PHP 8.1.13
ddev composer require 'drupal/votingapi:^3.0@beta'- manual download of this module, edit vote.info.yml to add
|| ^10compatibility - create Vote type, enable it on a node type, flush caches
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | Screenshot from 2023-05-29 10-03-36.png | 30.19 KB | dineshkumarbollu |
| #6 | 3360475-6.patch | 1.89 KB | pablorigueto |
| #5 | 3360475.patch | 1.9 KB | pablorigueto |
Issue fork vote-3360475
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kopeboyComment #3
kopeboyI'm also getting these 2 error every time I flush caches after having some votes on my site:
Warning: Undefined array key "vote_average" in Drupal\vote\Plugin\VoteBaseType\VoteBaseTypeRatherYesNo->getResultString() (line 41 of modules/contrib/vote/src/Plugin/VoteBaseType/VoteBaseTypeRatherYesNo.php)Deprecated function: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in Drupal\vote\Plugin\VoteBaseType\VoteBaseTypeRatherYesNo->getResultString() (line 41 of modules/contrib/vote/src/Plugin/VoteBaseType/VoteBaseTypeRatherYesNo.php)Comment #4
jfeltkampDefinitly planed to update and become stable for D10.
It's just a question of time.
Comment #5
pablorigueto commentedGuys, I add D10 on info, solve the checkAccess D10 issue, vote_average undefined and the round passing null.
I hope that helps you!!
Comment #6
pablorigueto commentedComment #8
dineshkumarbollu commentedHi
I review the patch#6 works fine in my local and also comaptible for D10,
i am attaching screenshot of upgrade status report for D10.
Thanks,
Comment #9
joseph.olstadThis module looks great BTW.
Patch #6 looks good! Thank you!
Please commit and tag a new release.
On June 21, 2023 (UTC) Drupal 10.1.0 will be released. (only a handful of days from now)
Comment #11
jfeltkampapplied patch
Available >= 1.0.0-beta1