Universal Viewer "unexpected token < in JSON position 0"

Copied files over from old server to new server. ImageMagick is working properly and can be tested-

Console out:

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Function.Deserialiser.parse (bundle.min.js:4)
at Object.create (bundle.min.js:5)
at Bootstrapper._loaded (bundle.min.js:9)
at bundle.min.js:9

Not really sure what it is: Recent downloads Omeka 2.6, IM 6.7.8

Seeing this thread and following through it did not help:

The manifest variable is getting:

Notice: Undefined variable: media in /data/omeka/plugins/UniversalViewer/views/helpers/IiifManifest.php on line 285

Fatal error: Uncaught Error: Call to a member function mediaType() on null in /data/omeka/plugins/UniversalViewer/views/helpers/IiifManifest.php:285
Stack trace:
#0 /data/omeka/plugins/UniversalViewer/views/helpers/IiifManifest.php(20): UniversalViewer_View_Helper_IiifManifest->_buildManifestItem(Object(Item))
#1 /data/omeka/application/libraries/Zend/View/Abstract.php(349): UniversalViewer_View_Helper_IiifManifest->iiifManifest(Object(Item))
#2 /data/omeka/plugins/UniversalViewer/controllers/PresentationController.php(120): Zend_View_Abstract->__call(‘iiifManifest’, Array)
#3 /data/omeka/application/libraries/Zend/Controller/Action.php(516): UniversalViewer_PresentationController->itemAction()
#4 /data/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘itemAction’)
#5 /data/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#6 /data/om in /data/omeka/plugins/UniversalViewer/views/helpers/IiifManifest.php on line 285

instead of the normal JSON-formatted manifest

Which version do you use? Current version is 2.4.6.

Somehow files from an older version were being pulled by a backup script from an older server.
Sorry about that. It was difficult to spot, but eventually I started looking at the files line by line and saw that the files I had weren’t those that were from the 2.4.6 repo.

This topic was automatically closed after 250 days. New replies are no longer allowed.