dachcom-digital / pimcore-i18n

Pimcore - i18n Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong Error Page in Static Route Context

pascalmoser opened this issue · comments

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no

Steps to reproduce:

  1. create a static route for an object
  2. in the controller throw a not found exception (e.g. when the object is not published or not found)
  3. disable the debug mode
  4. now the 404 error page set in the Pimcore admin does not work. Exception: I18n context already has been resolved
commented

@pascalmoser I get the same error I18n context already has been resolved when turning on production mode. Doesn't matter if inside a static route or on a regular Pimcore document.

Pretty sure this has something to do with the ResponseExceptionListener, that's just a guess though... 😅

commented

@solverat @pascalmoser Anything I can help with to help speed up things? We really need a fix to this issue as it blocks using production mode on the instances where we're using the i18n bundle.

The issue stems from the I18NStartupListener. It already sets an I18NContext and if an exception occurs the ResponseExceltionListener tries to set another one which leads to this error.

Thank you all! Fixed and released in 4.0.5!