Internationalisation: Unstyled exception page if page slug does not exist

When using the Internationalisation module on a site, a white unstyled exception page is shown if page slug does not exist. When deactivating the module a styled 404 error page is shown.

The white error page is only shown if page slug does not exist (e.g. /page/foo). If the controller part of the URL is misspelled (e.g. /foo/welcome) the correctly styled 404 error page appears.

The thrown error is:

Omeka S encountered an error

Omeka\Api\Exception\NotFoundException
Omeka\Entity\SitePage entity with criteria {"site":2,"slug":"foo"} not found

Details:

Omeka\Api\Exception\NotFoundException: Omeka\Entity\SitePage entity with criteria {"site":2,"slug":"foo"} not found in /srv/www/htdocs/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php:686
Stack trace:
#0 /srv/www/htdocs/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(404): Omeka\Api\Adapter\AbstractEntityAdapter->findEntity(Array, Object(Omeka\Api\Request))
#1 /srv/www/htdocs/omeka-s/application/src/Api/Manager.php(230): Omeka\Api\Adapter\AbstractEntityAdapter->read(Object(Omeka\Api\Request))
#2 /srv/www/htdocs/omeka-s/application/src/Api/Manager.php(115): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#3 /srv/www/htdocs/omeka-s/application/src/View/Helper/Api.php(69): Omeka\Api\Manager->read('site_pages', Array, Array)
#4 /srv/www/htdocs/omeka-s/modules/Internationalisation/src/View/Helper/LanguageSwitcher.php(98): Omeka\View\Helper\Api->read('site_pages', Array)
#5 [internal function]: Internationalisation\View\Helper\LanguageSwitcher->__invoke()
#6 /srv/www/htdocs/omeka-s/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array(Object(Internationalisation\View\Helper\LanguageSwitcher), Array)
#7 /srv/www/htdocs/omeka-s/themes/ub/view/layout/layout.phtml(110): Laminas\View\Renderer\PhpRenderer->__call('languageSwitche...', Array)
#8 /srv/www/htdocs/omeka-s/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include('/home/digiflow/...')
#9 /srv/www/htdocs/omeka-s/index.php(36): Laminas\View\Renderer\PhpRenderer->render(NULL)
#10 {main}

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.