BatchEdit and ORMInvalidArgumentException


We recently did an OS upgrade (to Ubuntu 20.04 LTS) on the box that runs our Omeka S installation (3.2.1). In our post installation checks I was trying to run BatchEdit jobs on a large number of items, and no matter what items I select or what tasks I ask it do, I get the following error and warning below:

Doctrine\ORM\ORMInvalidArgumentException: A new entity was found through the relationship 'Omeka\Entity\Value#property' that was not configured to cascade persist operations for entity: DoctrineProxies\__CG__\Omeka\Entity\Property@00000000000006990000000000000000. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem implement 'Omeka\Entity\Property#__toString()' to get a clue. in /data/www/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php:114
Stack trace:
#0 /data/www/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(3474): Doctrine\ORM\ORMInvalidArgumentException::newEntitiesFoundThroughRelationships()
#1 /data/www/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(385): Doctrine\ORM\UnitOfWork->assertThatThereAreNoUnintentionallyNonPersistedAssociations()
#2 /data/www/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(376): Doctrine\ORM\UnitOfWork->commit()
#3 /data/www/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(487): Doctrine\ORM\EntityManager->flush()
#4 /data/www/omeka-s/application/src/Api/Manager.php(236): Omeka\Api\Adapter\AbstractEntityAdapter->batchUpdate()
#5 /data/www/omeka-s/application/src/Api/Manager.php(146): Omeka\Api\Manager->execute()
#6 /data/www/omeka-s/application/src/Job/BatchUpdate.php(30): Omeka\Api\Manager->batchUpdate()
#7 /data/www/omeka-s/application/src/Job/DispatchStrategy/Synchronous.php(34): Omeka\Job\BatchUpdate->perform()
#8 /data/www/omeka-s/modules/Log/src/Job/Dispatcher.php(32): Omeka\Job\DispatchStrategy\Synchronous->send()
#9 /data/www/omeka-s/application/data/scripts/perform-job.php(66): Log\Job\Dispatcher->send()
#10 {main}
Warning: Return type of Laminas\Db\Adapter\ParameterContainer::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
in /data/www/omeka-s/vendor/laminas/laminas-db/src/Adapter/ParameterContainer.php on line 339

Our full system information

Omeka S
Version	3.2.1
Version	8.0.28
SAPI	apache2handler
Memory Limit	1G
POST Size Limit	2G
File Upload Limit	1G
Garbage Collection	Yes
Extensions	amqp, apache2handler, ast, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, ds, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libsmbclient, libxml, mailparse, mbstring, memcached, msgpack, mysqli, mysqlnd, OAuth, odbc, openssl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, psr, raphf, readline, redis, Reflection, rrd, session, shmop, SimpleXML, smbclient, snmp, soap, sockets, sodium, solr, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uuid, xdebug, xhprof, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib, zmq
Disabled Functions	, pcntl_alarm, pcntl_async_signals, pcntl_exec, pcntl_fork, pcntl_getpriority, pcntl_get_last_error, pcntl_setpriority, pcntl_signal, pcntl_signal_dispatch, pcntl_signal_get_handler, pcntl_sigprocmask, pcntl_sigtimedwait, pcntl_sigwaitinfo, pcntl_strerror, pcntl_unshare, pcntl_wait, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifcontinued, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig
Server Version	8.0.32-0ubuntu0.20.04.2
Client Version	mysqlnd 8.0.28
Version	Linux 5.4.0-144-generic x86_64

I have tried to read up on some of the other issues that have been brought up such as this one Doctrine throws ORMInvalidArgumentException on batch edit items and Batch updating resources with a resource template may throw a UniqueConstraintViolationException · Issue #1690 · omeka/omeka-s · GitHub. I am running Bulk Edit version 3.3.18 but even if I disable it, I get the same error.

My question is whether this error is tied to something in our OS upgrade, or if it is more like another module or something within Omeka S itself that is causing it?


You have disable all modules and to reenable them one by one (or by half) to find the issue.