Open donquixote opened 2 years ago
Provide a stub storage class RdfEntitySparqlStorage extends SparqlEntityStorage to prevent the class-not-found error.
Tried this, it does prevent the error from happening! Not sure what other side effects we need to worry about..
Tried this, it does prevent the error from happening!
Just to clarify, I did this without any sparql db configured locally. Drupal seems to only care about the class existing, not about actual data.
The linked PR https://github.com/idimopoulos/rdf_entity/pull/7 fixes the problem for me.
However, I don't really have sparql working in my local, and no entities stored there.
It just removes the error on updb from system_post_update_entity_revision_metadata_bc_cleanup()
.
From #141.
When upgrading a website to Drupal 9, with new version of rdf_skos, following the instructions from rdf_skos readme and rdf_entity readme, the following problem occurs in updb:
system_post_update_entity_revision_metadata_bc_cleanup() fails, because "Drupal\rdf_entity\Entity\RdfEntitySparqlStorage does not implement Drupal\Core\Entity\ContentEntityStorageInterface".
Debugging reveals that the exception is thrown in
Drupal\Core\Entity\ContentEntityType::checkStorageClass()
. At this time, the old definition ofrdf_entity
entity type is still stored in the key_value table, with its old storage class, which has since been removed.Of course the "does not implement ..." is slightly misleading, more accurate would be "does not exist".
I wonder what we need to do here. Some ideas:
RdfEntitySparqlStorage extends SparqlEntityStorage
to prevent the class-not-found error.The main use case we want to support here is for
rdf_skos
andoe_content
, which unfortunately did not respect the alpha status ofrdf_entity
. In this use case, therdf_entity
entity type does not really matter. So losing all data in rdf_entity it would be ok?