Daniel-KM / Omeka-S-module-Reference

Module for Omeka S to add glossary pages with the alphabetical indexes of specified classes and properties.
Other
3 stars 1 forks source link

Using o:resource_class as metadata raises error #20

Open Xentropics opened 5 months ago

Xentropics commented 5 months ago

When trying to use o:resource_class as a metadata an error is raised.

http://localhost:9002/api/references?metadata[test]=o:resource_class

Result:


Error
Call to a member function label() on array

Details:

Error: Call to a member function label() on array in /var/www/html/modules/Reference/src/Mvc/Controller/Plugin/References.php:510
Stack trace:
#0 /var/www/html/modules/Reference/src/Controller/ApiController.php(98): Reference\Mvc\Controller\Plugin\References->list()
#1 /var/www/html/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(377): Reference\Controller\ApiController->getList()
#2 /var/www/html/application/src/Controller/ApiController.php(168): Laminas\Mvc\Controller\AbstractRestfulController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#3 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Controller\ApiController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#4 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#5 /var/www/html/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#6 /var/www/html/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(307): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#7 /var/www/html/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractRestfulController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#8 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#9 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#10 /var/www/html/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#11 /var/www/html/index.php(21): Laminas\Mvc\Application->run()
#12 {main}```