https://github.com/intera/typo3-extension-errortuner
TYPO3 Extension for improved error handling and redirection to the login page.
https://github.com/intera/typo3-extension-errortuner
Last synced: 8 months ago
JSON representation
TYPO3 Extension for improved error handling and redirection to the login page.
- Host: GitHub
- URL: https://github.com/intera/typo3-extension-errortuner
- Owner: Intera
- Created: 2015-10-05T13:03:06.000Z (over 10 years ago)
- Default Branch: develop
- Last Pushed: 2021-03-24T12:48:51.000Z (about 5 years ago)
- Last Synced: 2025-06-08T07:05:59.015Z (12 months ago)
- Language: PHP
- Size: 15.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TYPO3 errortuner
This Extension improves the Frontend error handling for TYPO3.
## Features
* Redirect to login form if user is not logged in and tries to access an access protected page
* Consistent error handling between TYPO3 and webserver using PHP includes
## How to use
### TypoScript
Include the TypoScript files at `Configuration/TypoScript/LoginRedirect` to enable redirection to
the login form if user is not authenticated and tries to access a protected page.
### Site configuration
```
errorHandling:
- errorCode: 403
errorHandler: PHP
errorPhpClassFQCN: Int\Errortuner\PageErrorHandler\AccessDeniedErrorHandler
- errorCode: 404
errorHandler: PHP
errorPhpClassFQCN: Int\Errortuner\PageErrorHandler\PhpIncludeErrorHandler
- errorCode: 503
errorHandler: PHP
errorPhpClassFQCN: Int\Errortuner\PageErrorHandler\PhpIncludeErrorHandler
```
### TYPO3_CONF_VARS
Configure the files that should be included for the different error types:
```yaml
EXTCONF:
errortuner:
errorIncludes:
403: EXT:mysite/Resources/Public/Errors/403-forbidden.php
404: EXT:mysite/Resources/Public/Errors/404-not-found.php
503: EXT:mysite/Resources/Public/Errors/503-service-temporarily-unavailable.php
```
This should be configured as a fallback in case no site can be detected:
```yaml
FE:
pageNotFound_handling: "USER_FUNCTION: Int\\Errortuner\\PageErrorHandler\\PhpIncludeUserFunc->handleError404"
pageUnavailable_handling: "USER_FUNCTION: Int\\Errortuner\\PageErrorHandler\\PhpIncludeUserFunc->handleError503"
```
### .htaccess
```
ErrorDocument 403 /typo3conf/ext/mysite/Resources/Public/Errors/403-forbidden.php
ErrorDocument 404 /typo3conf/ext/mysite/Resources/Public/Errors/404-not-found.php
ErrorDocument 500 /typo3conf/ext/mysite/Resources/Public/Errors/500-internal-server-error.php
ErrorDocument 503 /typo3conf/ext/mysite/Resources/Public/Errors/503-service-temporarily-unavailable.php
```