klokantech / omeka-plugin-IIIF

Omeka plugin for IIIF image service: used for thumbnails & zoomable viewer. Omeka also serves IIIF Presentation API manifest for use in Mirador or other tools.
http://omeka.klokantech.com/
9 stars 3 forks source link

implement Omeka_Storage_Adapter_AdapterInterface interface #8

Open thatbudakguy opened 7 years ago

thatbudakguy commented 7 years ago

After plugin installation and adding the line:

storage.adapter = "Iiif_Storage_Adapter_Iiif"

to my application/config/config.ini, Omeka throws a fatal error:

Omeka_Storage_Exception: Storage adapters must implement the Omeka_Storage_Adapter_AdapterInterface interface. in /var/www/Omeka/application/libraries/Omeka/Storage.php:128
Stack trace:
#0 /var/www/Omeka/application/libraries/Omeka/Storage.php(94): Omeka_Storage->setAdapter('Iiif_Storage_Ad...', Array)
#1 /var/www/Omeka/application/libraries/Omeka/Storage.php(43): Omeka_Storage->setOptions(Array)
#2 /var/www/Omeka/application/libraries/Omeka/Application/Resource/Storage.php(34): Omeka_Storage->__construct(Array)
#3 /var/www/Omeka/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(695): Omeka_Application_Resource_Storage->init()
#4 /var/www/Omeka/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('storage')
#5 /var/www/Omeka/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap('storage')
#6 /var/www/Omeka/application/libraries/Zend/Application.php(373): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL)
#7 /var/www/Omeka/application/libraries/Omeka/Application.php(49): Zend_Application->bootstrap()
#8 /var/www/Omeka/admin/index.php(28): Omeka_Application->initialize()
#9 {main}
o1da commented 7 years ago

This is strange, can you try the latest version of this plugin with the latest version of Omeka.

thatbudakguy commented 7 years ago

I've replicated this today with both release 2.5 of Omeka as well as a simple git clone of the current Omeka repository. For the plugin, I've just followed the instructions in the readme and used git clone. Both setups give the same error.

o1da commented 7 years ago

I have just reproduced this error :) It happens when you have storage.adapter = "Iiif_Storage_Adapter_Iiif" in config.ini and the plugin isn't enabled or installed. So comment storage.adapter = "Iiif_Storage_Adapter_Iiif" then enable/or install the plugin and uncomment storage.adapter...

ThomasBSB commented 7 years ago

Hello everyone. Unfortunately, I ran into the same problem today, but was unable to solve it with the information available here. I was using the latest versions of Omeka and the latest version of the IIIF plugin (both cloned straight out of Github). In fact all I did was following the installation instructions as seen at https://omeka.org/add-ons/plugins/iiif/ or in the Github documentation. But it doesn't work. Placing the line storage.adapter = "Iiif_Storage_Adapter_Iiif" into the config.ini file leads to exactly the same error as described above. Could please anyone give me a hint on what do do?

o1da commented 7 years ago

@ThomasBSB This error info means that you want to use our plugin as storage.adapter but Omeka can't locate it. It is because the plugin isn't activated from Omeka plugin administration - it must be done before adding storage.adapter = "Iiif_Storage_Adapter_Iiif to config file.

ThomasBSB commented 7 years ago

Many thanks, Oldrich! This solved my problem. Since I'm new with Omeka, I wasn't aware of the fact that simply copying the files into the plugin directory isn't enough and one has to activate the plugin via the administration backend too. IMHO the plugin documentation does not point this out clear enough.