Drupal 10 release & relevant bug fixes

Created on 15 May 2023, over 1 year ago
Updated 11 February 2024, 9 months ago

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
🌱 Plan
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇹Italy kopeboy Milan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024