rdf_taxonomy generates a fatal error on the latest devel version

Created on 26 September 2023, 9 months ago
Updated 8 April 2024, 2 months ago

Steps to reproduce

Install the latest devel version (> 5.0.2)
enable rdf taxonomy module
add term to the root
visit devel tab, parent field has the following

"parent" => array:1 [
"x-default" => array:1 [
0 => array:1 [
"target_id" => "0"
]
]
]

visit the load (with references) devel tab, system generates the following issue

TypeError: Drupal\sparql_entity_storage\Entity\Query\Sparql\SparqlArg::uri(): Argument #1 ($uri) must be of type string, int given, called in /var/www/html/web/modules/contrib/sparql_entity_storage/src/Entity/Query/Sparql/SparqlArg.php on line 62 in Drupal\sparql_entity_storage\Entity\Query\Sparql\SparqlArg::uri() (line 76 of modules/contrib/sparql_entity_storage/src/Entity/Query/Sparql/SparqlArg.php).

Drupal\sparql_entity_storage\Entity\Query\Sparql\SparqlArg::toResourceUris() (Line: 48)
Drupal\sparql_entity_storage\Entity\Query\Sparql\SparqlArg::serializeUris() (Line: 283)
Drupal\sparql_entity_storage\SparqlEntityStorage->loadFromStorage() (Line: 233)
Drupal\sparql_entity_storage\SparqlEntityStorage->getFromStorage() (Line: 182)
Drupal\rdf_taxonomy\TermRdfStorage->getFromStorage() (Line: 200)
Drupal\sparql_entity_storage\SparqlEntityStorage->doLoadMultiple() (Line: 504)

Proposed resolution

Strip out '0' pseudo-reference in loadFromStorage for TermRdfStorage

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland alorenc Wolsztyn, πŸ‡΅πŸ‡±

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024