DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Advanced Exception

Author:Christopher
Created:2010-12-18T19:57:23
Changed:2013-09-24T16:25:13.500000000
Classification:advancedexception
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) ----
Keywords:Error, Page, Exception, Design, Layout
Author:Eric Depta
Email:info@ericdepta.de
Language:en

EXT: Advanced Exception

Extension Key: advancedexception

Language: en

Version: x.y.z

Keywords: Error, Page, Exception, Design, Layout

Copyright 2006-2012, Eric Depta, <info@ericdepta.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

`EXT: Advanced Exception 1 <#__RefHeading__5708_1738894311>`_

`Introduction 3 <#__RefHeading__5710_1738894311>`_

What does it do? 3

Screenshots 3

`Users manual 5 <#__RefHeading__467_413120346>`_

`Administration 6 <#__RefHeading__31511_818911409>`_

`Configuration 7 <#__RefHeading__31515_818911409>`_

Redirect 7

Template 7

Styling / Layout 7

Reference 8

Example 9

`Known problems 10 <#__RefHeading__31525_818911409>`_

`To-Do list 11 <#__RefHeading__477_413120346>`_

Introduction

What does it do?

Advanced Exception provides a way to handle exceptions. You can either redirect to an internal page, where you can show the exception message inside your content or can use your own template for the error page.

Screenshots

Error Template:

img-1 Styleable error page Fluid-Template.

Redirect:

img-2 Styleable Fluid-Template content element.

Users manual

Advanced Exception is easy to use. Just install the extension as usual.It includes needed TypoScript by it self.

Administration

To test Advanced Exception you can use the test Frontend-Plugin “Advanced Exception Tester” which will cause an “Advanced Exception Test Error”.

For doing so simply create a new content element.Than choose “Insert Plugin” for the type and go to the Plugin tab where you select “Advanced Exception Tester”.If you show the page you should get the “Advanced Exception Test Error” message with the provided default design.

Configuration

To configure Advanced Exception you only need a few lines TypoScript.

Redirect

One Exception handling method is the redirect which will lead you to an internal page if an error is caused. Just choose “redirect” as “method” in the settings and configure the redirect values. Important is that you provide at least the “pageUid”.

If you like to show the error box on the landing page you can insert the provided “Advanced Exception Box” Frontend-Plugin.

Template

The other handling method is the template method which outputs an complete html error page. Choose “template” as “method” for that.

Styling / Layout

To use your own templates you have to define “templateRootPath”, ”partialRootPath” and “layoutRootPath” in the view settings. Than you can copy the templates from the extension (advanced_exception/Resources/Private/*) to the defined path. Next you might edit these Fluid-Templates.

For the redirect method you have to edit the “Box/Show.html” template.For the template method you have to edit the “Exception.html” template.

In that template you have access to the following data:
title

Variable

title

Description

Computed title from the exception

message

Variable

message

Description

Exception message

baseurl

Variable

baseurl

Description

Typo3 site url

backurl

Variable

backurl

Description

Url where the exception was thrown

exception

Variable

exception

Description

The exception (php Exception) which contains:

message: the exception message
previous: previous exception
code: error code
file: name of the file in which the exception was thrown
line: line number in which the exception was thrown
trace: php stacktrace
traceAsString: php stacktrace as string

For example:

{exception.message} should give you the same like {message}

Exception data:
message

Variable

message

Description

Exception message

code

Variable

code

Description

Error code

file

Variable

file

Description

Name of the file in which the exception was thrown

line

Variable

line

Description

Line number in which the exception was thrown

trace

Variable

trace

Description

Php stacktrace

traceAsString

Variable

traceAsString

Description

Php stacktrace as string

Reference

General settings:
method

Property

method

Data type

string

Description

Exception handling method.

possible values: “redirect”, “template”, “default”

Default

template

[plugin.tx_advancedexception.settings]

Redirect settings:

All settings here start with “redirect.”

pageUid

Property

pageUid

Data type

int

Description

PageId to which the redirect goes

Default

pageType

Property

pageType

Data type

int

Description

Page Type

Default

noCache

Property

noCache

Data type

boolean

Description

Adds "no_cache=1" to the generated URL

Default

noCacheHash

Property

noCacheHash

Data type

boolean

Description

If set, the additionalParams list is split to a hash string that is appended to the URL, like “&cHash=ae83fd7s87”. When the caching mechanism encounters this value, it calculates the same value on the server based on incoming values in $_GET, excluding id, type, no_cache, ftu, cHash, MP values. If the incoming cHash value matches the calculated value, the page may be cached based on this.

The [SYS][encryptionKey] is included in the hash in order to make it unique to the server and non-predictable.

Default

section

Property

section

Data type

string

Description

If this value is present, it's prepended with a "#" and placed after any internal URL to another page.

This is used create a link that jumps directly to a section on another page.

Default

additionalParams

Property

additionalParams

Data type

Description

Default

[plugin.tx_advancedexception.settings.redirect]

View settings:

All settings here start with “view.”

templateRootPath

Property

templateRootPath

Data type

string

Description

Path to the template folder

Default

EXT:advanced_exception/Resources/Private/Templates/

partialRootPath

Property

partialRootPath

Data type

string

Description

Path to the partial folder

Default

EXT:advanced_exception/Resources/Private/Partials/

layoutRootPath

Property

layoutRootPath

Data type

string

Description

Path to the layout folder

Default

EXT:advanced_exception/Resources/Private/Layouts/

[plugin.tx_advancedexception.view]

Example

Template example:

plugin.tx_advancedexception.settings.method = template
plugin.tx_advancedexception.view {
        templateRootPath = fileadmin/templates/ext/AdvancedException/Resources/Private/Templates/
        partialRootPath = fileadmin/templates/ext/AdvancedException/Resources/Private/Partials/
        layoutRootPath = fileadmin/templates/ext/AdvancedException/Resources/Private/Layouts/
}

Redirect example:

plugin.tx_advancedexception.settings.method = redirect
plugin.tx_advancedexception.settings.redirect.pageUid = 14
plugin.tx_advancedexception.view {
        templateRootPath = fileadmin/templates/ext/AdvancedException/Resources/Private/Templates/
        partialRootPath = fileadmin/templates/ext/AdvancedException/Resources/Private/Partials/
        layoutRootPath = fileadmin/templates/ext/AdvancedException/Resources/Private/Layouts/
}

Known problems

So far no known problems. If you find one pleas be so kind and send me an e-amil.

To-Do list

Turning the redirect property to a typolink.