Skip to content

Commit

Permalink
improve the documentation a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
René Fritz committed Jul 21, 2018
1 parent 79dc60a commit c1fcad0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
Binary file added Documentation/Images/custom-error-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/Images/default-error-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions Documentation/Introduction/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ There are other extensions with the same (or more) functionality. This one is a
- custom error page possible with a normal content page
- will redirect if a page was not deleted but moved to another domain in another page tree


Screenshots
-----------

This is the inbuilt error message.

.. figure:: ../Images/default-error-message.png

You can use a normal TYPO3 page instead if you want.
20 changes: 13 additions & 7 deletions Documentation/Usage/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
Usage
=====

when a requested page couldn't be found in TYPO3 it call this extension.
When a requested page couldn't be found in TYPO3 it call this extension.

This is what happens then

- check if were in a loop and if so show the internal 404 page
- check if page exists on other domain and if so do a 301 redirect
- check if were in a loop and if so, show the internal 404 page
- check if page exists on another domain and if so do a 301 redirect
- show custom error page if exists
- redirect to root page on domain if possible
- show internal 404 page and exit

If this behaviour doesn't fit to your needed functionality you have to use another 404 extension or change the code of
this extension.

Setup
-----
Expand All @@ -34,13 +36,15 @@ No configuration is needed but the extension depends on some prerequisite.
Custom 404 Page
---------------

A custom 404 page is a normal page. I suggest you mark it with 'not in menu'
A custom 404 page is a normal TYPO3 page. I suggest you mark it with 'not in menu'.

Two things are a must for that page to work:

- it has to be a child page of the page which has the domain record on it
- put 'http404' in the field *url alias*

.. figure:: ../Images/custom-error-page.png

To test if your page work:

- preview the page
Expand All @@ -50,12 +54,14 @@ To test if your page work:
Remarks
-------

It seems weird but the topic is in fact complex. Unavailable configuration, a bit clunky core api, absence of magic.
It seems weird but the topic 404 handling is in fact complex. Unavailable configuration, a bit clunky core api, absence of magic.

The extension is not heavily tested in different environments. For me it works as expected, but you should test it with your setup - which is a good idea anyways.
The extension is not heavily tested in different environments. For me it works as expected, but you should test it with
your setup - which is a good idea anyways.


Debugging
---------

In ``auto404/Classes/Hooks/FrontendHook.php::log`` theres a commented line with ``error_log()``. Uncomment the line and you get some logging in the php error log.
In ``auto404/Classes/Hooks/FrontendHook.php::log`` theres a commented line with ``error_log()``. Uncomment the line and
you get some logging in the php error log.

0 comments on commit c1fcad0

Please sign in to comment.