Bug #24945
closedStatus "500 Internal Server Error" returned, if page is not found
100%
Description
Due to the ExceptionHandler, no status 404 is returned, if a page is not found, but status 500 instead.
This happens with and without URL (only the message differs)
(issue imported from #M17471)
Files
Updated by Steffen Gebert about 13 years ago
Sorry, have no time to work on this. I think we could use the t3lib_message_ErrorMessagePage and output the message, instead of throwing the Exception (which results in the Exception Handler sending the 500).
Updated by Steffen Gebert about 13 years ago
Pending for Review:
master: https://review.typo3.org/1245
TYPO3_4-5: https://review.typo3.org/1246
Updated by Steffen Gebert about 13 years ago
Attached the patches out of Gerrit.
Updated by Peter Kraume about 13 years ago
I've tested 17471_v2-4.5.diff with TYPO3 4.5.2 and the error still persists.
In the frontend, I get the error 500.
The log has the following entry:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: The page did not exist or was inaccessible. Reason: The requested page does not exist! | RuntimeException thrown in file /html/typo3_src-4.5.2/typo3/sysext/cms/tslib/class.tslib_fe.php in line 1476
Updated by Steffen Gebert about 13 years ago
Okay, this line was not covered, as I was unsure. I'm currently investigating and will provide an updated patch soon.
Updated by Steffen Gebert about 13 years ago
Attached an updated patch.
Time to get into Git, Peter ;-)
Updated by Mr. Hudson about 13 years ago
Patch set 6 of change Ia6c7686c720863aa80e390c452527cabb338bde3 has been pushed to the review server.
It is available at http://review.typo3.org/1245
Updated by Steffen Gebert about 13 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset 255191d9c7c954698ab7b9c089c0bf93690ee46e.
Updated by Peter Kraume about 13 years ago
Sorry, but the issue still has a minor flaw:
Core: Error handler (FE): PHP Warning: Missing argument 2 for t3lib_message_ErrorpageMessage::__construct() in /html/typo3_src-4.5.2/t3lib/message/class.t3lib_message_errorpagemessage.php line 55
According to the API documentation, the $title is missing:
http://api.typo3.org/typo3v4/current/html/classt3lib__message___errorpage_message.html
Updated by Steffen Gebert about 13 years ago
- Category deleted (
Communication) - Target version changed from 4.5.1 to 4.5.3
Thanks.. I also noticed this last week and fixed it for master in some places (hower not in 4-5, of course).
Continued in #25727
Updated by Peter Kraume about 13 years ago
What exactly do you mean with "not in 4-5"?
Updated by Steffen Gebert about 13 years ago
I noticed the problem and fixed it partly in master, but forgot to conclude that this also require a patch for 4-5 branch. So everything safe, as soon as #25727 is in.
Updated by Oliver Hader almost 13 years ago
- Status changed from Resolved to Closed