You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I want to add a 'freeform' item without selecting a resource template Omeka S encounters an error. After deactivating the LinkedDataSets-module, it works as expected (i.e. an item is added).
Screenshot to replicate:
Error + stack trace:
Error
Call to a member function label() on null
Details:
Error: Call to a member function label() on null in /var/www/html/modules/LinkedDataSets/Module.php:139
Stack trace:
#0 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): LinkedDataSets\Module->dispatchJobs(Object(Laminas\EventManager\Event))
#1 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(171): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\EventManager\Event))
#2 /var/www/html/application/src/Db/Event/Subscriber/Entity.php(117): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\EventManager\Event))
#3 /var/www/html/application/src/Db/Event/Subscriber/Entity.php(78): Omeka\Db\Event\Subscriber\Entity->trigger('entity.persist....', Object(Doctrine\ORM\Event\LifecycleEventArgs))
#4 /var/www/html/vendor/doctrine/event-manager/lib/Doctrine/Common/EventManager.php(41): Omeka\Db\Event\Subscriber\Entity->postPersist(Object(Doctrine\ORM\Event\LifecycleEventArgs))
#5 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Event/ListenersInvoker.php(99): Doctrine\Common\EventManager->dispatchEvent('postPersist', Object(Doctrine\ORM\Event\LifecycleEventArgs))
#6 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1158): Doctrine\ORM\Event\ListenersInvoker->invoke(Object(Doctrine\ORM\Mapping\ClassMetadata), 'postPersist', Object(Omeka\Entity\Item), Object(Doctrine\ORM\Event\LifecycleEventArgs), 4)
#7 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(425): Doctrine\ORM\UnitOfWork->executeInserts(Object(Doctrine\ORM\Mapping\ClassMetadata))
#8 /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(392): Doctrine\ORM\UnitOfWork->commit(NULL)
#9 /var/www/html/application/src/Api/Adapter/AbstractEntityAdapter.php(349): Doctrine\ORM\EntityManager->flush()
#10 /var/www/html/application/src/Api/Manager.php(224): Omeka\Api\Adapter\AbstractEntityAdapter->create(Object(Omeka\Api\Request))
#11 /var/www/html/application/src/Api/Manager.php(78): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#12 /var/www/html/application/src/Mvc/Controller/Plugin/Api.php(99): Omeka\Api\Manager->create('items', Array, Array, Array)
#13 /var/www/html/application/src/Controller/Admin/ItemController.php(215): Omeka\Mvc\Controller\Plugin\Api->create('items', Array, Array)
#14 /var/www/html/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Omeka\Controller\Admin\ItemController->addAction()
#15 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#16 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#17 /var/www/html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#18 /var/www/html/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#19 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#20 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#21 /var/www/html/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#22 /var/www/html/index.php(21): Laminas\Mvc\Application->run()
#23 {main}
Issue
When I want to add a 'freeform' item without selecting a resource template Omeka S encounters an error. After deactivating the LinkedDataSets-module, it works as expected (i.e. an item is added).
Screenshot to replicate:
Error + stack trace:
Contextual information:
Omeka version: tested on 4.0.1 and 4.0.4
Installed modules:
The text was updated successfully, but these errors were encountered: