Forums / Setup & design / error.ini not working

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

eZ debug

Timing: Jan 18 2025 15:17:52
Script start
Timing: Jan 18 2025 15:17:52
Module start 'content'
Timing: Jan 18 2025 15:17:53
Module end 'content'
Timing: Jan 18 2025 15:17:53
Script end

Main resources:

Total runtime1.0005 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 587.7031180.8438
Module start 'content' 0.00530.8664 768.5469595.2891
Module end 'content' 0.87160.1288 1,363.8359333.3828
Script end 1.0005  1,697.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3905210.0002
Check MTime0.00150.1463210.0001
Mysql Total
Database connection0.00060.062110.0006
Mysqli_queries0.929092.85241990.0047
Looping result0.00190.19481970.0000
Template Total0.972897.220.4864
Template load0.00180.182820.0009
Template processing0.971097.042320.4855
Template load and register function0.00020.022610.0002
states
state_id_array0.00130.133110.0013
state_identifier_array0.00090.092820.0005
Override
Cache load0.00150.1549380.0000
Sytem overhead
Fetch class attribute can translate value0.00100.096840.0002
Fetch class attribute name0.00120.115860.0002
XML
Image XML parsing0.00130.125140.0003
class_abstraction
Instantiating content class attribute0.00000.002160.0000
General
dbfile0.00320.3149330.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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