Daniel-KM / Omeka-S-module-Timeline

Module for Omeka S that integrates the Simile Timeline widget and the online Knightlab timeline to create timelines.
Other
6 stars 7 forks source link

Timeline Exhibit it generates an empty div #27

Closed tomvitale closed 1 month ago

tomvitale commented 4 months ago

OS Ubuntu 22.04 lts Omeka-S 4.1.1 Timeline-3.4.21

If I create a Timeline everything is OK, but if I try to use a Timeline Exhibit it generates a practically empty div

<div class="block block-timelineExhibit" style="">
<div id="timeline-25" class="timeline" style="width: 100%; height: 80vh;"></div>
</div>

If I analyse the page, it returns the error:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)  /api/timeline/25:1

If I click on the error I get

Omeka S encountered an error
ParseError
syntax error, unexpected token ":"

Details:

ParseError: syntax error, unexpected token ":" in /var/www/html/omeka-s/modules/Timeline/src/Mvc/Controller/Plugin/TimelineExhibitData.php:209
Stack trace:
#0 /var/www/html/omeka-s/vendor/laminas/laminas-loader/src/StandardAutoloader.php(220): Laminas\Loader\StandardAutoloader->loadClass()
#1 /var/www/html/omeka-s/modules/Timeline/src/Service/ControllerPlugin/TimelineExhibitDataFactory.php(13): Laminas\Loader\StandardAutoloader->autoload()
#2 /var/www/html/omeka-s/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(615): Timeline\Service\ControllerPlugin\TimelineExhibitDataFactory->__invoke()
#3 /var/www/html/omeka-s/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(234): Laminas\ServiceManager\ServiceManager->doCreate()
#4 /var/www/html/omeka-s/vendor/laminas/laminas-servicemanager/src/AbstractPluginManager.php(171): Laminas\ServiceManager\ServiceManager->get()
#5 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/Controller/PluginManager.php(109): Laminas\ServiceManager\AbstractPluginManager->get()
#6 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(258): Laminas\Mvc\Controller\PluginManager->get()
#7 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(273): Laminas\Mvc\Controller\AbstractController->plugin()
#8 /var/www/html/omeka-s/modules/Timeline/src/Controller/ApiController.php(109): Laminas\Mvc\Controller\AbstractController->__call()
#9 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(377): Timeline\Controller\ApiController->getList()
#10 /var/www/html/omeka-s/application/src/Controller/ApiController.php(169): Laminas\Mvc\Controller\AbstractRestfulController->onDispatch()
#11 /var/www/html/omeka-s/modules/Timeline/src/Controller/ApiController.php(213): Omeka\Controller\ApiController->onDispatch()
#12 /var/www/html/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Timeline\Controller\ApiController->onDispatch()
#13 /var/www/html/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#14 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#15 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(307): Laminas\Mvc\Controller\AbstractController->dispatch()
#16 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractRestfulController->dispatch()
#17 /var/www/html/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#18 /var/www/html/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#19 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#20 /var/www/html/omeka-s/index.php(21): Laminas\Mvc\Application->run()
#21 {main}
giocomai commented 3 months ago

I can confirm this issue. As suggested in the error message, this seems to be just a syntax error, with a : instead of a ;. Replacing: with ; at the end of line 209 of /modules/Timeline/src/Mvc/Controller/Plugin/TimelineExhibitData.php seems to fix it for me.