Daniel-KM / Omeka-plugin-UniversalViewer

Plugin for Omeka that adds the IIIF specifications in order to act like an IIPImage server, and the UniversalViewer, a unified online player for any file. It can display books, images, maps, audio, movies, pdf, 3D views, and anything else as long as the appropriate extensions are installed.
Other
23 stars 20 forks source link

PDF Promise Rejection 2.6.0 #43

Open dauten opened 5 years ago

dauten commented 5 years ago

Images display fine in Universal Viewer but whenever I load a PDF I get the following error:

Unhandled promise rejection SyntaxError: "JSON.parse: unexpected character at line 1 column 1 of the JSON data"
    parse http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/uv.js:4
    load http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/uv.js:3
    g http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17
    F http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17
    k http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17
 offline.js:17:10369
    b http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17
    E http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17
    G http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17
    exports http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:16
    <anonymous> http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17
    s http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17
    t http://146.163.157.78/omeka/plugins/UniversalViewer/views/shared/javascripts/uv/lib/offline.js:17

the exif, gd, and imagemagick php plugins are all installed:

pi@digitalinit:/var/www/html/omeka/plugins$ php -m
[PHP Modules]
apcu
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Error seems to be in UV javascript but could be a configuration error?

Output of composer install:

root@digitalinit:/var/www/html/omeka/plugins/UniversalViewer# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing asset/uv (3.0.33)
    Downloading: 100%         

  - Installing slowprog/composer-copy-file (0.3.1)
    Downloading: 100%         

Generating autoload files
> SlowProg\CopyFile\ScriptHandler::copy
Copied file(s) from vendor/asset/uv/ to views/shared/javascripts/uv/.