Magento2 product detail page's title showing 404 Not Found Error - magento2

Everything works fine but product detail page's title showing 404 Not Found Error.
Any one faced same error before?

I have faced this issue and it wasn't a rewrite problem.
Try attaching the debugger to the try/catch in \Magento\Catalog\Controller\Product\View::execute since this one does a redirect to noroute in the catch.
In my case, way I found out we made an override for vendor/magento/module-catalog/Helper/Product/View.php where $pageConfig->setDescription($this->string->substr(strip_tags($product->getDescription()), 0, 255));
throws an Exception because $string was declared private in the original and should use \Magento\Framework\Stdlib\StringUtils instead.
Anyway, searching for things like $resultForward->forward('noroute'); and attaching debugger there is a good way to start.

This is happening due to any exceptions are throwing while loading the PDP pages. Mostly the error is throwing from vendor/magento/module-catalog/Helper/Product/View.php

Related

Typo3 9.5 why can't you see on what page the error is at?

Why can't you see exactly where the error is thrown with Typo3? Like with Laravel. When an error is shown it usually also shows on what PAGE CLASS or FUNCTION that error is made....
Is it possible, to change that? With an extension or something?
Please see the documentation about Error and Exception Handling on how to configure this to display all error details locally but only show a human readable error on production.

PageExpiredException occurs after closing of ModalWindow

Currently I'm trying to upgrade the application from wicket 1.4 to wicket 6 and I'm stuck with the following issue:
When I try to close ModalWindow, it is closed but I receive PageExpiredException on the page where I was opening this ModalWindow, so I'm redirected to
/myapp/wicket/bookmarkable/org.apache.wicket.markup.html.pages.PageExpiredErrorPage
I thought maybe the way I create ModalWindow is outdated, so I've tried an example from here
http://www.wicket-library.com/wicket-examples-6.0.x/ajax/modal-window?0
and it gives me the same exception.
Maybe I have to configure something in my WebApplication implementation, but I don't know what.
If anyone could help, it'll be really appreciated. Thanks.
Check your server logs for errors related to the serialization of the opener page. PageExpiredException means that the page cannot be found in the page storage. If there was an error with the serialization then it won't be stored and thus later won't be found too.

How do I debug Facelets page rendering issues?

I am using JBoss 7.1, Seam 2.2.2.
When rendering a page I am getting the Facelets debug page with a NullPointerException without any line number indicating where on the page it is occurring. Are there some standard tricks to debug such issues? I can't see any way to put in log statements, etc in this case.
Thanks!
This post may be helpful to you: https://stackoverflow.com/a/5458247/498531. Basically it lets you override a built-in Seam component to print a stacktrace of any exception thrown. It helped me once that I inadvertently had two toString() methods calling each other, and all I was just getting from the logs was a StackOverflowError, with no reference to any line of my code.

How to test an error page with Error 500 using Zend Framework

I am working on a project where client requires me to beautifully display error 500 with stacktrace etc.
So, I checked the Error Controller and made a nice fancy error page in corresponding views/script
The problem is, how do I test it?
Whilst working on the project, I cleared error on every page and there is no way I could generate it again. Also, I am using doctrine and I remember "echo-ing" the entitymanager array but, I cannot trace the location.
How would I custom generate error 500, "keeping it real"?
PS: I tried htaccess thing and trust me, it throws apache error and not zend 500.
It was pretty silly but, finally found it.
All I needed was to mis-spell a dql tablename on any page where I use querybuilder.

Zend Error controller stopped working for 500

My Zend application was running fine until today, when I changed something which caused the error controller to stop working.
I have debugged every part of the code but I can not find any traces as to why is it happening
If I produce a 404 error, the error controller runs perfectly. But in case of 500, the control does not go to error controller.
I have tried many things but am still unable to find out what's wrong. I have searched the internet but people who encountered this problem, seemed to get no answer :(
Any help would be much appreciable
I have debugged the application step by step and found out that in case of 500, the execution stops instantly when it encounters a fatal error or exception
(UPDATE)
If I do something like...
$blabla->getInfo();
where $blabla is not defined, I don't get redirected to error controller.
But if I do something like...
Zend_Registry::get('blabla');
where no key is set for 'blabla' in Zend_Registry, then I get redirected
500 is a general server error, so no wonder the control does not go to your controller.
You will need to check your server logs to find out what is causing the error.
Also, try to recall whether you have altered your .htaccess file(s) recently and/or created an infinite redirect loop by accident.