Omeka S encountered an error - hosted server

Hi there,

unfortunately I have not been able to find a solution for the error message I get when I try to add new items or item sets. I was able to add the first item set, but then I get a white screen with the ‘Omeka S encountered an error’ message on top.

Any suggestions?

This is the error in the log:
2018-05-30T09:50:30+00:00 ERR (3): Error: Call to a member function transliterate() on null in /mydomain.com/application/src/Api/Adapter/SiteSlugTrait.php:67
Stack trace:
#0 /mydomain.com/application/src/Api/Adapter/SiteSlugTrait.php(27): Omeka\Api\Adapter\SiteAdapter->slugify(‘mysite’)
#1 /mydomain.com/application/src/Api/Adapter/SiteAdapter.php(76): Omeka\Api\Adapter\SiteAdapter->getAutomaticSlug(‘mysite’)
#2 /mydomain.com/application/src/Api/Adapter/AbstractEntityAdapter.php(552): Omeka\Api\Adapter\SiteAdapter->hydrate(Object(Omeka\Api\Request), Object(Omeka\Entity\Site), Object(Omeka\Stdlib\ErrorStore))
#3 /mydomain.com/application/src/Api/Adapter/AbstractEntityAdapter.php(267): Omeka\Api\Adapter\AbstractEntityAdapter->hydrateEntity(Object(Omeka\Api\Request), Object(Omeka\Entity\Site), Object(Omeka\Stdlib\ErrorStore))
#4 /mydomain.com/application/src/Api/Manager.php(224): Omeka\Api\Adapter\AbstractEntityAdapter->create(Object(Omeka\Api\Request))
#5 /mydomain.com/application/src/Api/Manager.php(78): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#6 /mydomain.com/application/src/Mvc/Controller/Plugin/Api.php(99): Omeka\Api\Manager->create(‘sites’, Array, Array, Array)
#7 /mydomain.com/application/src/Controller/SiteAdmin/IndexController.php(64): Omeka\Mvc\Controller\Plugin\Api->create(‘sites’, Array)
#8 /mydomain.com/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(78): Omeka\Controller\SiteAdmin\IndexController->addAction()
#9 /mydomain.com/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#10 /mydomain.com/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /mydomain.com/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(106): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#12 /mydomain.com/vendor/zendframework/zend-mvc/src/DispatchListener.php(138): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#13 /mydomain.com/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#14 /mydomain.com/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /mydomain.com/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))
#16 /mydomain.com/index.php(21): Zend\Mvc\Application->run()
#17 {main}

What’s the URL your site is running on? And what’s your hosting provider/plan?

The “/mydomain.com” in the logs is suspect, unless that is actually your domain or you modified the logs.

Hi Ben,
I changed the URLs in the log to hide my actual site.

Please add the following line between line 66 and 67 in /application/src/Api/Adapter/SiteSlugTrait.php:

echo Transliterator::getErrorMessage();

You should see the ICU error message as the first element of your displayed page.

Hi,
thanks for the advice, but unfortunately this has not solved the problem. The error message on top stays the same.

Replace

echo Transliterator::getErrorMessage();

with

throw new \Exception(Transliterator::getErrorMessage());

It is not to save your problem but to know what is the problem with your local ICU library. So please paste the error message here (the stack trace is not needed).