Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to add new items without selecting a resource template after activating LDS-module #17

Open
Xentropics opened this issue Dec 12, 2023 · 0 comments

Comments

@Xentropics
Copy link

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:

Pasted Graphic

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}

Contextual information:

Omeka version: tested on 4.0.1 and 4.0.4

Installed modules:

  "modules": [
    {
      "name": "IiifServer",
      "version": "3.6.14",
      "zipUrl": "https://github.com/Daniel-KM/Omeka-S-module-IiifServer/releases/download/${version}/IiifServer-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name": "ImageServer",
      "version": "3.6.14",
      "zipUrl": "https://github.com/Daniel-KM/Omeka-S-module-ImageServer/releases/download/${version}/ImageServer-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name": "ValueSuggest",
      "version": "1.16.1",
      "zipUrl": "https://github.com/omeka-s-modules/ValueSuggest/releases/download/v${version}/ValueSuggest-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name": "NdeTermennetwerk",
      "version": "1.1.0",
      "zipUrl": "https://github.com/omeka-s-modules/NdeTermennetwerk/releases/download/v${version}/NdeTermennetwerk-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name":"AdvancedResourceTemplate",
      "version": "3.4.26",
      "zipUrl": "https://github.com/Daniel-KM/Omeka-s-module-AdvancedResourceTemplate/releases/download/${version}/AdvancedResourceTemplate-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name":"CSVImport",
      "version": "2.5.0",
      "zipUrl": "https://github.com/omeka-s-modules/CSVImport/releases/download/v${version}/CSVImport-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name":"FacetedBrowse",
      "version": "1.3.1",
      "zipUrl": "https://github.com/omeka-s-modules/FacetedBrowse/releases/download/v${version}/FacetedBrowse-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name":"CustomVocab",
      "version": "2.0.2",
      "zipUrl": "https://github.com/omeka-s-modules/CustomVocab/releases/download/v${version}/CustomVocab-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name":"NumericDataTypes",
      "version": "1.11.3",
      "zipUrl": "https://github.com/omeka-s-modules/NumericDataTypes/releases/download/v${version}/NumericDataTypes-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },

    {
      "name":"LinkedDataSets",
      "version": "0.1",
      "zipUrl": "https://github.com/netwerk-digitaal-erfgoed/Omeka-S-Module-LinkedDataSets/releases/download/v${version}/LinkedDataSets-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name":"UriDereferencer",
      "version": "1.4.0",
      "zipUrl": "https://github.com/omeka-s-modules/UriDereferencer/releases/download/v${version}/UriDereferencer-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name":"Ark",
      "version": "3.5.13.4",
      "zipUrl": "https://gitlab.com/Daniel-KM/Omeka-S-module-Ark/-/archive/${version}/Omeka-S-module-Ark-${version}.zip",
      "install": false,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    },
    {
      "name": "ServerUrlOverride",
      "version": "1.0.0",
      "zipUrl": "https://github.com/zerocrates/ServerUrlOverride/releases/download/v${version}/ServerUrlOverride-${version}.zip",
      "install": true,
      "config": false,
      "configForm": { "url": "", "formData": [] }
    }
 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant