Reference module indexing error

Since updating the Reference module to the releases that are compatible with Omeka v4, I have not been able to index references via Global Settings > Jobs > Index reference metadata.

After running the job, I see the green “Settings successfully updated.” message. But if I open the job, I see the Status “Error”. And the reference_metadata table is empty. When looking at the log, I see this error:

2024-02-22T18:35:06+00:00 NOTICE (5): Starting creation of reference metadata. {"referenceId":"Reference/Metadata/job_2211"}
2024-02-22T18:35:09+00:00 ERR (3): Doctrine\ORM\EntityNotFoundException: Unable to find "DoctrineProxies\__CG__\Omeka\Entity\ItemSet" entity identifier associated with the UnitOfWork in /vendor/doctrine/orm/lib/Doctrine/ORM/EntityNotFoundException.php:43
Stack trace:
#0 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(3082): Doctrine\ORM\EntityNotFoundException::noIdentifierFound('DoctrineProxies...')
#1 /vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(690): Doctrine\ORM\UnitOfWork->getEntityIdentifier(Object(DoctrineProxies\__CG__\Omeka\Entity\ItemSet))
#2 /vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(727): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->prepareUpdateData(Object(Reference\Entity\Metadata), true)
#3 /vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(266): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->prepareInsertData(Object(Reference\Entity\Metadata))
#4 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1128): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts()
#5 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(425): Doctrine\ORM\UnitOfWork->executeInserts(Object(Doctrine\ORM\Mapping\ClassMetadata))
#6 /vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(392): Doctrine\ORM\UnitOfWork->commit(NULL)
#7 /modules/Reference/src/Job/UpdateReferenceMetadata.php(103): Doctrine\ORM\EntityManager->flush()
#8 /application/src/Job/DispatchStrategy/Synchronous.php(34): Reference\Job\UpdateReferenceMetadata->perform()
#9 /modules/Common/src/Job/Dispatcher.php(27): Omeka\Job\DispatchStrategy\Synchronous->send(Object(Omeka\Entity\Job))
#10 /application/data/scripts/perform-job.php(66): Common\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\Synchronous))
#11 {main} {"referenceId":"Reference/Metadata/job_2211"}

I’ve tested with Omeka 3.2.3 and Omeka 4.0.4 and I’ve tested in two different server environments.

Reference 3.4.4 is the latest release that will index successfully. I would use this release, but the Reference block layout fails in 3.4.4 with this error when viewing the public page with a reference block:

Call to undefined method Doctrine\DBAL\Query\QueryBuilder::getQuery()

Are others experiencing this? Or is it just me?

Adding that this is happening in an installation of 3000 items, 2 sites with the uncustomized Default Omeka S theme, and all modules have been deactivated except for Reference.

Following up on this topic to ask if anyone can replicate this behavior or suggest how to get Reference 3.4.7 to successfully index references.

I’d like to update an Omeka S installation to 4 next week. But the site has 60,000+ items and relies heavily on the Reference module. So if indexing in 3.4.7 continues to fail, then I’ll have to wait to upgrade.

Did you updated doctrine in Omeka S and in each module: Run composer install --no-dev in the omeka directory.

I did not. I followed the instructions here for updating modules.

This behavior happens in a fresh install of Reference 3.4.7 as well (installed as described here)

It looks like @jflatnes suggested a fix in this github issue that @Daniel_KM merged recently. So maybe this will be resolved in the next release of Reference?

Yes, you can wait one week for the next release.

Hi @Daniel_KM, any update on this?