Forums / Developer / Changes in kernel code

Changes in kernel code

|
|
Next topic
 »
Author Message

Eirik Alfstad Johansen

Wednesday 10 December 2003 2:44:27 am

Hi,

I've come to a point where I need to make changes in the kernel code (specifically in the shop module). So my question is this:

Is there any way of modifying the kernel code and still ensuring that my installation remains upgradeable by new ezp distributions?

Is it, for instance, possible to create a module extension with the same name and views as the kernel modules, and will these override the kernel modules and views?

Thanks in advance !

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Marco Zinn

Wednesday 10 December 2003 12:49:01 pm

I can't answer your question, because i don't know, if an extension is designed to override parts of the kernel.

Maybe you could post your modification in the bug list as "enhancement", if this is the character of your modification.

Or do you do some "personal" tweakings?

Marco
http://www.hyperroad-design.com

Eirik Alfstad Johansen

Thursday 11 December 2003 12:00:05 am

Hi Marco,

Thanks for your reply. My modifications to the shop module are in essence an extension of the information collected when placing an order.

However, regardless of whether ezp could use this as an extension or not, I'll be making several modifications in the future, and several of them will be usable just for us. So I really need to find out how this works.

Anyone from ez around?

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Bård Farstad

Thursday 11 December 2003 12:05:36 am

If you need additional information on an order you should look into storing this using the shop account handler ( which serializes information to XML ).

Another approach can be using workflows.

You should try to make your additions in extensions as much as possible. If you change the kernel code you will definetly have problems with upgrades.

--bård

Documentation: http://ez.no/doc

Eirik Alfstad Johansen

Thursday 11 December 2003 12:24:48 am

Hi Bård,

I have made use of the shop account handler to the extend possible. However, this is (as you know) also a part of the kernel code, as well as the register view of the shop module which I've had to modify in order to validate the new data being collected.

It surprised me that there was no other way of doing something as simple as modifying the collected order information without touching the kernel code, but when dived into it, I found out that the data used by ezp was hardcoded. Hopefully, I'm missing something that would make this easier.

Maybe the answer is in the creation of a new shopaccounthandler? But that brings me back to the question of whether it would be accessible or not if I put it in a module extension with the same name as the shop module. Furthermore, that still doesn't solve the problem with the shop/register.php modifications.

Sincerely,

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Thursday 11 December 2003 1:01:29 am

You could create a small patch file that can be applied to future versions (provided the targeted file remains the same...)

For our shop in www.planet-troy.com we had to add a small function to retreive needed information to:

ezproductcollectionitem.php

which we maintain as a patch.

Its not as good as an extension because file checks need to be performed on new version but its a good compromise for us.

paul

Georg Franz

Friday 12 December 2003 3:44:18 am

Hi Bard,

I also made some minor changes in some files which are in /kernel/content and I've the same question: Is there another way to keep this modifications instead of doing the modifications in new versions of ez again?

-> Suggestion for future versions: An "override" directory for kernel / lib files would be fine (the same way as with templates), this can be placed in "extension" or in an own main directory.

Kind regards,
Emil.

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Graham Brookins

Wednesday 01 January 2025 11:04:58 am

Hello Eirik and Others Listening!

In eZ Publish 6 We quickly addressed this problem by patching the core kernel that loads module views and made extensions detected take priority and load instead of the available kernel modules.

This solves this problem cleanly within existing extension structures.

Here is the related change on GitHub!

For those interested but not running the latest eZ Publish 6 release 6.0.6 can use this ezpublish5 based kernel override extension, bckernelmoduleoverride.

Enjoy!

Cheers,

Graham

eZ debug

Timing: Jan 17 2025 18:10:14
Script start
Timing: Jan 17 2025 18:10:14
Module start 'content'
Error: eZImageManager::createImageAlias Jan 17 2025 18:10:15
The reference alias original file var/site/storage/images/users/administrator-users/graham-brookins/556993-1-eng-GB/graham-brookins.jpg does not exist
Error: Jan 17 2025 18:10:15
Original alias does not exist, cannot create other aliases without it
Timing: Jan 17 2025 18:10:15
Module end 'content'
Timing: Jan 17 2025 18:10:15
Script end

Main resources:

Total runtime1.5439 sec
Peak memory usage4,096.0000 KB
Database Queries215

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0671 603.0156180.8438
Module start 'content' 0.06711.3534 783.8594809.2500
Module end 'content' 1.42050.1233 1,593.1094344.9063
Script end 1.5438  1,938.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2554210.0002
Check MTime0.00140.0909210.0001
Mysql Total
Database connection0.00090.055510.0009
Mysqli_queries1.430692.66082150.0067
Looping result0.00220.14542120.0000
Template Total1.428492.520.7142
Template load0.00210.135620.0010
Template processing1.426392.386020.7132
Template load and register function0.00010.006910.0001
states
state_id_array0.00830.537010.0083
state_identifier_array0.00270.175220.0014
Override
Cache load0.00190.1247670.0000
Sytem overhead
Fetch class attribute can translate value0.00170.108070.0002
Fetch class attribute name0.00130.0862130.0001
XML
Image XML parsing0.00680.441570.0010
class_abstraction
Instantiating content class attribute0.00000.0019150.0000
General
dbfile0.01060.6856550.0002
String conversion0.00000.000430.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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 35
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs