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:

  1. 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)
  2. 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

  1. Clean install of Drupal 10.0.9 (from DDEV CMS Quickstart), with MariaDB and PHP 8.1.13
  2. ddev composer require 'drupal/votingapi:^3.0@beta'
  3. manual download of this module, edit vote.info.yml to add || ^10 compatibility
  4. create Vote type, enable it on a node type, flush caches

Issue fork vote-3360475

Command icon 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

kopeboy created an issue. See original summary.

kopeboy’s picture

Title: Drupal 10 relaease » Drupal 10 release & relevant bug fixes
kopeboy’s picture

I'm also getting these 2 error every time I flush caches after having some votes on my site:

  1. Warning: Undefined array key "vote_average" in Drupal\vote\Plugin\VoteBaseType\VoteBaseTypeRatherYesNo->getResultString() (line 41 of modules/contrib/vote/src/Plugin/VoteBaseType/VoteBaseTypeRatherYesNo.php)
  2. 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)
jfeltkamp’s picture

Definitly planed to update and become stable for D10.
It's just a question of time.

pablorigueto’s picture

StatusFileSize
new1.9 KB

Guys, I add D10 on info, solve the checkAccess D10 issue, vote_average undefined and the round passing null.
I hope that helps you!!

pablorigueto’s picture

StatusFileSize
new1.89 KB

dineshkumarbollu made their first commit to this issue’s fork.

dineshkumarbollu’s picture

Status: Active » Needs review
StatusFileSize
new30.19 KB

Hi

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,

joseph.olstad’s picture

This 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)

  • peduardo authored 22af0a48 on 1.0.x
    Issue #3360475 by peduardo: Drupal 10 release & relevant bug fixes
    
jfeltkamp’s picture

Status: Needs review » Fixed

applied patch
Available >= 1.0.0-beta1

Status: Fixed » Closed (fixed)

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