eZ Community » Forums » Developer » Kernel View Override
expandshrink

Kernel View Override

Kernel View Override

Monday 06 December 2010 3:49:48 pm - 5 replies

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

Tuesday 07 December 2010 5:39:23 pm

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

Modified on Tuesday 07 December 2010 5:39:54 pm by Mark Simon

Tuesday 07 December 2010 6:20:53 pm

@ 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

Tuesday 07 December 2010 6:38:47 pm

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...

Wednesday 08 December 2010 9: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. blunk.gif Emoticon

@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.

Friday 03 June 2011 8:30:12 am

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

Modified on Friday 03 June 2011 8:31:43 am by Andy Caiger

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from