dachcom-digital / pimcore-i18n

Pimcore - i18n Manager
Other
28 stars 18 forks source link

Wrong Error Page in Static Route Context #96

Closed pascalmoser closed 2 years ago

pascalmoser commented 2 years ago
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
aarongerig commented 2 years ago

@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... 😅

aarongerig commented 2 years ago

@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.

Zodiarc commented 2 years ago

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.

solverat commented 2 years ago

Thank you all! Fixed and released in 4.0.5!