Problem installing Annotate and Cartography moduls

Hi ,
especially @Daniel_KM I guess.
I am anxious to try out the Annotate and Cartograpy modules, but have currently ran intro troubles that I would like to share:

Some time ago I did some personel updates on the Annotate 3.1.3.5 module to get it working in OmekaS v3.0.1 (Zend renaming and some strict type fixes) and after installing first the DataTypeGeometry and CustumVocab modules (dont know versions at the moment). I used Generic 3.3.26 I believe. And then it installed fine and WORKED OKE, as far as I could see for over 2 months.

Now I thought yesterday, its time to try out the Cartography module too.
So I downloaded the Cartography-3.3.3.6-beta (from github) and tried installing it.
This gave errors:

TypeError: Return value of Generic\InstallResources::createResourceTemplate() must be an instance of Generic\ResourceTemplateRepresentation, instance of Omeka\Api\Representation\ResourceTemplateRepresentation returned in /usr/local/www/oms/modules/Generic/InstallResources.php:410

So I thought lets update Generic (to 3.3.27) went OK and Annotate(to your 3.3.3.6-beta). But helas, there it all went wrong, with error:

PHP Notice:  Undefined index: o:data in /usr/local/www/oms/Generic-3.3.27/InstallResources.php

and further:
 TypeError
array_values() expects parameter 1 to be array, null given

Details:

TypeError: array_values() expects parameter 1 to be array, null given in /usr/local/www/oms/Generic-3.3.27/InstallResources.php:600
Stack trace:
#0 /usr/local/www/oms/Generic-3.3.27/InstallResources.php(600): array_values(NULL)
#1 /usr/local/www/oms/Generic-3.3.27/InstallResources.php(402): Generic\InstallResources->flagValid(Array)
#2 /usr/local/www/oms/Generic-3.3.27/InstallResources.php(153): Generic\InstallResources->createResourceTemplate('/usr/local/www/...')
#3 /usr/local/www/oms/Generic-3.3.27/AbstractModule.php(158): Generic\InstallResources->createAllResources('Annotate')
#4 /usr/local/www/oms/Generic-3.3.27/AbstractModule.php(86):

Actually about the same error happened when I tried to install the CartoGraphy module a few hours ago when Annotate was still installed, before I decided to upgrade Annotate :frowning:

So for me this is rather bad: Annotate does not work anymore, reverting back (to Generic 3.3.26 and my Annotate 3.1.3.5v3 )seems not an option because I than get other errors (some stringpos() and/or array_values() things). But anyhow I would really like to stay using Generic 3.3.27 as it seems needed with your latest IiifServer or ImageServer I think.

Please give some advice about how I should go about. At least getting Annotate to work again.

Thanks John

Hi,

Always do a backup before an upgrade! It’s is recommended on all forums, for all cms, for all people. And check if your backup is good, else you can’t restore it. In particular when you upgrade to a beta version.

Nevertheless, I think it’s only a strict type bug, so I think I can fix it simply. Use only the last versions of modules, because I cannot check all combinations of modules and Omeka version (they don’t have all automatic tests).

The main point with all my upgrades to v3 was that I use “strict type”, so now a null is no more casted to a string in some functions. This is a simple issue and I fixed most of them, but you probably find some more.

Annotate is the most important module, since it is and will be used as a backend for many features.

So send me the list of issues, so I can fix it.

Wow, that is a fast response. And a reassuring one, I just did not recognise it as a strict type bug, so I was a bit alarmed.

Where should I send the issues I find? in this forum? In your gitlab Annotate issues? Or?

For me Annotation is also a very interesting thing, because I really want to have/develop a module that provides the Annotation protocol (to be used by e.g. Mirador) and uses a simple triple store as backend(Now I am using Arc2 just for test) that can store/hydrate annotationcollections to/from a rdf-file linked as Media to an Item. Something like is done in Maddoc, but now with OmekaS native means only :slight_smile:
Ok I am awaiting the updates.

Hi, about the need for backup, yes I know.
But don’t worry, this was just a test site of mine.

Greetings John

Indeed, there are three parts in the open annotation standard, the vocabulary, the data model and the protocol. The first two are managed, but not the last, and this is the point I’m working on in order to be able to use with mirador without the need to install an annotation server or to depend on a third party.
So you can send on gitlab or github, it’s fine. But it will not manage the triple store for now.

1 Like

Thanks, Daniel,
your strict typing changes in Generic did the trick!
I succesfully installed Annotation (3.3.3.6-beta) and Cartography (my v3. update of 3.1.3.2)

And wow again, they even seem to work (more or less)…
Though I could appreciate an example or some tips on how to nicely use the Item annotions and locations on a site page or so.

1 Like