eZJscore and AJAX definition in extension

Author Message

Jean-Luc Chassaing

Friday 02 July 2010 2:20:35 am

Hello,

I need some help here about ezjscore.ini file.

Here is the thing. I've built a new ajax server function that works well.

my problem is that this function is declared in an extension that is only activated in a specific siteaccess with the ActiveAccessExtensions parameter.

Now in this specific extension settings folder I've put my ezjscore.ini.append.php file to declare my brand new ajax function.

The problem is that it doesn't work. I need to declare the extension in the override site.ini.append.php file as an ActiveExtension or to directly put my ezjscore.ini.append.php file in the override folder or in my specific siteaccess folder.

In fact the problem is that in the ezjsserverrouter.php file, at line 72 :

$ezjscoreIni = eZINI::instance( 'ezjscore.ini' );

the ini files in extensions that are declared true ActiveAccessExtensions parameters are not loaded.

Couldn't there be a way to turn around this because I think that it is much more clean to gather all the specific code and the related configuration files in the extension.

André R.

Friday 02 July 2010 4:28:09 am

Are you using index_ajax.php?

Then you need to un-comment the eZExtension line in index_ajax.php:

// Check for new extension loaded by siteaccess ( disabled for performance reasons )
//eZExtension::activateExtensions( 'access' );

This is done in trunk, but not in any of the stable versions yet.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Jean-Luc Chassaing

Friday 02 July 2010 5:10:59 am

Thank you,

Yes I'm using index_ajax.php, I made the uncomment and it works well. I'll have a look at performance.

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 01:14:59
Script start
Timing: Jan 18 2025 01:14:59
Module start 'layout'
Timing: Jan 18 2025 01:14:59
Module start 'content'
Timing: Jan 18 2025 01:14:59
Module end 'content'
Timing: Jan 18 2025 01:14:59
Script end

Main resources:

Total runtime0.8104 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.1641152.6406
Module start 'layout' 0.00610.0035 741.804739.4766
Module start 'content' 0.00960.7993 781.2813545.7734
Module end 'content' 0.80890.0014 1,327.054712.1250
Script end 0.8103  1,339.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4546160.0002
Check MTime0.00150.1832160.0001
Mysql Total
Database connection0.00090.105110.0009
Mysqli_queries0.752792.8827570.0132
Looping result0.00060.0759550.0000
Template Total0.774295.520.3871
Template load0.00240.292720.0012
Template processing0.771995.250320.3859
Template load and register function0.00010.013510.0001
states
state_id_array0.00120.147210.0012
state_identifier_array0.00210.257120.0010
Override
Cache load0.00200.2494240.0001
Sytem overhead
Fetch class attribute can translate value0.00160.203620.0008
Fetch class attribute name0.00150.180050.0003
XML
Image XML parsing0.00110.139020.0006
class_abstraction
Instantiating content class attribute0.00000.002060.0000
General
dbfile0.00080.0963230.0000
String conversion0.00000.001240.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs