Feature #17794
closedadd an error code to pageNotFoundAndExit
100%
Description
A custom error handler has not enough infos to react corretly upon different error reasons. The only way is to parse the reason text which may change from one TYPO3 version to the next. Therefor it is necessary that the various $TSFE functions pass an error code to pageNotFoundAndExit() as parameter.
eg
100 = The requested page does not exist!
101 = The requested page does not exist (type)! *
200 = Page is not available in the requested language.
201 = Page is not available in the requested language (strict).
202 = Page is not available in default language.
300 = Request parameters could not be validated (&cHash comparison failed)
301 = Request parameters could not be validated (&cHash empty)
etc
- for spacers
(issue imported from #M6719)
Updated by Dmitry Dulepov over 16 years ago
Can't we extract code with regular expression? Something like:
$code = preg_replace('/^\S+\s+(\d+)\s/', '\1', $header);
(untested)
Updated by Martin Kutschker over 16 years ago
We could, but before that works the error message must contain them. And we should consider localization before we add numbers to messages.
Updated by Mathias Schreiber almost 10 years ago
- Description updated (diff)
- Category set to Frontend
- Status changed from New to Accepted
- Target version changed from 0 to 7.0
- PHP Version changed from 4.3 to 5.5
I agree that should be possible.
If header is omitted, the Regex by dimitry should try to extract the appropriate status code
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from 7.0 to 7.1 (Cleanup)
Updated by Benni Mack over 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 7 LTS
Updated by Benni Mack about 9 years ago
- Target version changed from 7 LTS to 8 LTS
Updated by Riccardo De Contardi over 7 years ago
- Target version changed from 8 LTS to 9.0
Updated by Susanne Moog almost 7 years ago
- Target version changed from 9.0 to 9.2
Updated by Susanne Moog over 6 years ago
- Target version changed from 9.3 to 9.4
Updated by Gerrit Code Review over 6 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57201
Updated by Gerrit Code Review over 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57201
Updated by Gerrit Code Review over 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57201
Updated by Gerrit Code Review over 6 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57201
Updated by Gerrit Code Review over 6 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57201
Updated by Gerrit Code Review over 6 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57201
Updated by Gerrit Code Review over 6 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57201
Updated by Benni Mack over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5ac17650f7256a620c50b5f2951ab713b8472156.