Troubles with annotation module

I tried installing the Annotation module in Omeka S 3.0.1. It politely told me that I needed to Custom Vocab module, which I then did. Following that Omeka started spitting out error on the screen and log (I enabled both). Here is the head of the log, any help would be appreciated.
2020-11-13T22:34:42+00:00 ERR (3): PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘omeka.r0_.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:88
Stack trace:
#0 /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(88): PDO->query(‘SELECT r0_.id A…’)
#1 /var/www/html/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(910): Doctrine\DBAL\Driver\PDOConnection->query(‘SELECT r0_.id A…’)
#2 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery(‘SELECT r0_.id A…’, Array, Array, NULL)
#3 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(337): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#4 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(992): Doctrine\ORM\Query->_doExecute()
#5 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(947): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1)
#6 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(750): Doctrine\ORM\AbstractQuery->execute(NULL, 1)
#7 /var/www/html/omeka-s/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(177): Doctrine\ORM\AbstractQuery->getResult(1)
#8 /var/www/html/omeka-s/modules/Annotate/src/Api/Adapter/AnnotationAdapter.php(168): Doctrine\ORM\Tools\Pagination\Paginator->getIterator()
#9 /var/www/html/omeka-s/application/src/Api/Manager.php(221): Annotate\Api\Adapter\AnnotationAdapter->search(Object(Omeka\Api\Request))
#10 /var/www/html/omeka-s/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#11 /var/www/html/omeka-s/application/src/Mvc/Controller/Plugin/Api.php(63): Omeka\Api\Manager->search(‘annotations’, Array, Array)
#12 /var/www/html/omeka-s/modules/Annotate/src/Controller/Admin/AnnotationController.php(28): Omeka\Mvc\Controller\Plugin\Api->search(‘annotations’, Array)
#13 /var/www/html/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(77): Annotate\Controller\Admin\AnnotationController->

1 Like

I just stumbled upon this issue and this is the part of the error you should probably take care of:

I’ve seen here on the forums that a similar error was caused in the past by compatibility issues between Omeka Classic and some SQL versions.

Setting sql_mode="" seems to solve the issue. How to do it exactly depends on your setup, but there’s plenty of details online if you search for something like “disable only_full_group_by” (if you feel this is alright for your setup).

To clarify, this hower gets me only a bit further.

When I install the module, I get this message:

  • The settings to manage the annotation template are not saved. You shoud edit the resource template “Annotation” manually.

But I am unsure what to do about it. Should I manually import the Web Annotation Ontology, then create a Resource template called Annotation? Seems strange all such things wouldn’t be in the documentation/in the readme.

Without furhter action, I hower still get an error whenever I try to edit an item:

Error: Call to a member function id() on null in /var/www/html/volume/modules/Annotate/Module.php:1062

May well be related to the kind of issues highlighted in this other post on the forum.

Update:

it appears that by installing the Generic module first, then Custom vocab, and the Annotate, all works fine.

This issue is fixed in last version of Annotate (3.3.3.6-beta-2). I think I’ll go in final release soon.