Kernel View Override

Author Message

Laurent Dorier

Monday 06 December 2010 6:49:48 am

Hi everybody,

I would like to override the kernel/error/view.php file, but no idea how to do it properly.
Could someone explain shortly what would be the best way.

Thanks a lot
Laurent

Mark Simon

Tuesday 07 December 2010 8:39:23 am

Hello Lorent,

have you tried to use the same override possibility for kernel classes with

EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE

in config.php

more Infos:
http://www.ezpedia.org/solution/overriding_kernel_classes_within_an_extension

It should work with classes, maybe it works with all php files of the kernel.

Greetings
Mark

www.all2e.com

Heath

Tuesday 07 December 2010 9:20:53 am

@ Laurent

Hello ... to my knowledge what you ask is not (yet?) possible.

Kernel overrides are only good for classes not views.

I think your best option is to patch that part of the kernel and move on (since it's the error module view).

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Gaetano Giunta

Tuesday 07 December 2010 9:38:47 am

For error/view, there are quite a few settings in site.ini that might fit the bill for your needs wrt. customized error management. It's a bit hard to understand what they do, so I advice to simply experiment.

As for taking control over an existing module/view: iirc it is possible, using url aliases. Not sure it will work for things that are accessed via internal module redirects though...

Principal Consultant International Business
Member of the Community Project Board

Laurent Dorier

Wednesday 08 December 2010 12:35:08 am

Thanks everyone for your answers and help !!!

@Mark: it's only working for classes. The reason of this thread. But thanks anyway. ;)

@Heath: probably the easiest way for me here... But I dislike to patch the kernel.

@Gaetano: I read few threads about the url alias option, but I have no idea how to use it for kernel/errors issues with "undefined" URLs like kernel 20 errors.

In fact, I think my issue is coming from this fix:
http://share.ez.no/forums/general/blank-accounts#comment31325

I will open a ticket, maybe someonoe will produce a real fix to keep/use sessions for errors pages as well.

Andy Caiger

Thursday 02 June 2011 11:30:12 pm

According to this thread: http://share.ez.no/forums/developer/override-kernel-classes, it is possible to override module views, datatypes etc. Any comments?

EAB - Integrated Internet Success
Offices in England, France & China.
http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com

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 04:23:55
Script start
Timing: Jan 18 2025 04:23:55
Module start 'layout'
Timing: Jan 18 2025 04:23:55
Module start 'content'
Timing: Jan 18 2025 04:23:56
Module end 'content'
Timing: Jan 18 2025 04:23:56
Script end

Main resources:

Total runtime1.0104 sec
Peak memory usage4,096.0000 KB
Database Queries75

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.9375152.6094
Module start 'layout' 0.00610.0031 741.546939.4219
Module start 'content' 0.00920.9996 780.9688708.6406
Module end 'content' 1.00880.0015 1,489.609416.1875
Script end 1.0103  1,505.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3143160.0002
Check MTime0.00120.1234160.0001
Mysql Total
Database connection0.00120.121810.0012
Mysqli_queries0.934392.4730750.0125
Looping result0.00080.0772730.0000
Template Total0.980697.120.4903
Template load0.00230.225920.0011
Template processing0.978396.827720.4892
Template load and register function0.00020.017110.0002
states
state_id_array0.00090.085110.0009
state_identifier_array0.00100.102920.0005
Override
Cache load0.00190.1907460.0000
Sytem overhead
Fetch class attribute can translate value0.00090.089250.0002
Fetch class attribute name0.00110.1094100.0001
XML
Image XML parsing0.00230.231950.0005
class_abstraction
Instantiating content class attribute0.00000.0016100.0000
General
dbfile0.00150.1495350.0000
String conversion0.00000.000740.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 9

Time used to render debug report: 0.0002 secs