error.ini not working

Author Message

Philipp Groszmann

Tuesday 28 October 2008 9:03:56 am

Hi!
I tried to set up a propper 404-error page using error.ini setting to "redirect". The error message disappeared but the redirection is not happening.
Settings are (shortened):

[ErrorSettings]
DefaultErrorHandler=redirect
DefaultRedirectURL=/content/view/full/8794
DefaultRerunURL=/content/view/full/2
DefaultEmbedURL=/user/login

[ErrorSettings-kernel]
ErrorHandler[]
ErrorHandler[20]=redirect
RedirectURL[]
RedirectURL[2]=/404
RedirectURL[3]=/404
RedirectURL[4]=/404
RedirectURL[20]=/404
RedirectURL[21]=/404
RedirectURL[22]=/404

Any ideas?

cheers
Philipp

Yannick Komotir

Wednesday 29 October 2008 7:54:23 am

Hi,

You can simply copy the folder "error" from the standard design to your site access and customize files like 20.tpl, 21.tpl and 22.tpl which correspond to 404 http error.

Regards
Yannick Komotir

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Philipp Groszmann

Thursday 30 October 2008 2:54:17 am

Thanks, that's nice for the start.
But besides I'd have to change eight pages this solution will not send the correct page headers.
I'd like to get the propper solution work.

cheers
Philipp

Gaetano Giunta

Thursday 30 October 2008 10:55:04 am

# here you set up only error type 20 to be redirected
ErrorHandler[20]=redirect
# even if here you set up a redirect page for all the error types...
RedirectURL[]
RedirectURL[2]=/404
RedirectURL[3]=/404
RedirectURL[4]=/404
RedirectURL[20]=/404
RedirectURL[21]=/404
RedirectURL[22]=/404

#you most likely miss:
ErrorHandler[21]=redirect
ErrorHandler[22]=redirect
# etc...

Principal Consultant International Business
Member of the Community Project Board

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:24:53
Script start
Timing: Jan 18 2025 16:24:53
Module start 'layout'
Timing: Jan 18 2025 16:24:53
Module start 'content'
Timing: Jan 18 2025 16:24:54
Module end 'content'
Timing: Jan 18 2025 16:24:54
Script end

Main resources:

Total runtime0.6956 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 594.8672152.6250
Module start 'layout' 0.00550.0030 747.492239.4453
Module start 'content' 0.00850.6854 786.9375594.2109
Module end 'content' 0.69390.0016 1,381.148412.1719
Script end 0.6955  1,393.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4802160.0002
Check MTime0.00140.1996160.0001
Mysql Total
Database connection0.00080.114110.0008
Mysqli_queries0.640092.0088620.0103
Looping result0.00070.0957600.0000
Template Total0.662395.220.3312
Template load0.00210.303020.0011
Template processing0.660294.914320.3301
Template load and register function0.00020.023610.0002
states
state_id_array0.00120.168610.0012
state_identifier_array0.00120.170120.0006
Override
Cache load0.00180.2580380.0000
Sytem overhead
Fetch class attribute can translate value0.00060.087930.0002
Fetch class attribute name0.00140.195760.0002
XML
Image XML parsing0.00120.173830.0004
class_abstraction
Instantiating content class attribute0.00000.001660.0000
General
dbfile0.00090.1298220.0000
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs