Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when not page found on netgen/admin-ui-bundle": "^2.1.4 #19

Open
damaya opened this issue Sep 7, 2018 · 3 comments
Open

Exception when not page found on netgen/admin-ui-bundle": "^2.1.4 #19

damaya opened this issue Sep 7, 2018 · 3 comments

Comments

@damaya
Copy link

damaya commented Sep 7, 2018

Hi there, recently we updated the error handling in our site to change redirects to an external static error site 404.mysite.com, to an internal error page (twigBundle view/exception) with response _404 which is the expected behavior.
However, we noticed an exception:
request.ERROR: Uncaught PHP Exception Netgen\Bundle\AdminUIBundle\Exception\NotFoundHttpException: "Not Found" at /home/ubuntu/mysite/vendor/netgen/admin-ui-bundle/bundle/EventListener/LegacyResponseListener.php line 62 {"exception":"[object] (Netgen\\Bundle\\AdminUIBundle\\Exception\\NotFoundHttpException(code: 0): Not Found at /home/mysite/vendor/netgen/admin-ui-bundle/bundle/EventListener/LegacyResponseListener.php:62)"} []
Could you please enlight us how to add a config or override to avoid this exception?
Thanks in advance.

@emodric
Copy link
Member

emodric commented Sep 11, 2018

Hi @damaya,

On what pages you get the exception? Admin UI 404 pages should display legacy error pages by default.

@damaya
Copy link
Author

damaya commented Sep 11, 2018

Hi @emodric thanks so much for your answer:
My summary of our concern is this:

  1. We are getting this error in all not found pages. [Not a problem]
  2. The AdminUI interface works good and as expected. [Not a problem]
  3. We are getting the expected behavior for the 404 error pages, I mean the NetgenAdminUI doesn't affect the expected response. [Not a problem]
    4. The real problem is that we are getting the reported error in logs for each not found page, the issue is that as long as we have a high traffic website, this error log could flood our server and generate downtime issues. [This is our problem]

We have a replica of our staging site without the NetgenAdminUI Bundle, the 404 error pages works as expected and in the same way as the site with the AdminUI, but without the flooding of error logs.

Thanks in advance for your time and your help.

@emodric
Copy link
Member

emodric commented Sep 12, 2018

You can tune what goes into your logs in Monolog configuration: https://symfony.com/doc/current/logging.html

But, you're saying that in regular 404 errors, the ones not related to Netgen Admin UI, you do not get an entry in your log file, but only when using Netgen Admin UI? That sounds a bit weird. For me, when accessing a non existing page inside Netgen Admin UI, no error is written to the log, neither in dev nor in prod environments. This is due to eZ Platform Legacy Bridge handling the exception and converting dispatching it to the legacy kernel so it can handle it instead of Symfony.

What version of Legacy Bridge are you running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants