Error: cannot access protected property on edit and save operation

Hi,

Anyone seen this error when trying to save an edited item? See below. FWIW, recently installed several new modules, including the Universal Viewer and IIIF server modules, although I haven’t yet tried disabling to see if it might be related.
I haven’t tried adding any new items to see if that also generates an error.

There was an error.
Error: Cannot access protected property Omeka\Entity\ResourceTemplateProperty::$isRequired in /var/www/html/omeka-s/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php:90
Stack trace:
#0 /var/www/html/omeka-s/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php(133): Doctrine\Common\Collections\Expr\ClosureExpressionVisitor::getObjectFieldValue(Object(Omeka\Entity\ResourceTemplateProperty), ‘isRequired’)
#1 [internal function]: Doctrine\Common\Collections\Expr\ClosureExpressionVisitor->Doctrine\Common\Collections\Expr{closure}(Object(Omeka\Entity\ResourceTemplateProperty))
#2 /var/www/html/omeka-s/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php(387): array_filter(Array, Object(Closure))
#3 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php(652): Doctrine\Common\Collections\ArrayCollection->matching(Object(Doctrine\Common\Collections\Criteria))
#4 /var/www/html/omeka-s/application/src/Api/Adapter/AbstractResourceEntityAdapter.php(144): Doctrine\ORM\PersistentCollection->matching(Object(Doctrine\Common\Collections\Criteria))
#5 /var/www/html/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(444): Omeka\Api\Adapter\AbstractResourceEntityAdapter->validateEntity(Object(Omeka\Entity\Item), Object(Omeka\Stdlib\ErrorStore))
#6 /var/www/html/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(346): Omeka\Api\Adapter\AbstractEntityAdapter->hydrateEntity(Object(Omeka\Api\Request), Object(Omeka\Entity\Item), Object(Omeka\Stdlib\ErrorStore))
#7 /var/www/html/omeka-s/application/src/Api/Manager.php(205): Omeka\Api\Adapter\AbstractEntityAdapter->update(Object(Omeka\Api\Request))
#8 /var/www/html/omeka-s/application/src/Api/Manager.php(137): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#9 /var/www/html/omeka-s/application/src/Mvc/Controller/Plugin/Api.php(147): Omeka\Api\Manager->update(‘items’, ‘3613’, Array, Array, Array)
#10 /var/www/html/omeka-s/application/src/Controller/Admin/ItemController.php(176): Omeka\Mvc\Controller\Plugin\Api->update(‘items’, ‘3613’, Array, Array)
#11 /var/www/html/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(78): Omeka\Controller\Admin\ItemController->editAction()
#12 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /var/www/html/omeka-s/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(105): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#15 /var/www/html/omeka-s/vendor/zendframework/zend-mvc/src/DispatchListener.php(119): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#16 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#17 /var/www/html/omeka-s/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#18 /var/www/html/omeka-s/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#19 /var/www/html/omeka-s/index.php(17): Zend\Mvc\Application->run()
#20 {main}

Thanks,

Carl

This looks to be a Doctrine bug (a bug in one of Omeka S’s dependencies), but one that only shows up in certain circumstances. I believe that it’s probably down to your new modules that you’re seeing this, but we should be able to stop it from happening regardless (Doctrine seems to have recently fixed the bug).

Ok. I’ll try disabling/uninstalling the latest modules (one-at-a-time) and see where it stands.

Thanks.

Carl

I disabled the ‘Folksonomy’ module and now I can edit and save items again. Universal Viewer/IIF Server modules remain installed and enabled.

Thanks.

Carl

The module Folksonomy is compatible with Beta 3, but the fix for the current dev version is not published yet.

I published the fix for the plugin Folksonomy, you can reinstall and reenable it if wanted.