Forums / Extensions / eZJscore and AJAX definition in extension

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.

eZ debug

Timing: Jan 17 2025 22:58:40
Script start
Timing: Jan 17 2025 22:58:40
Module start 'content'
Timing: Jan 17 2025 22:58:40
Module end 'content'
Timing: Jan 17 2025 22:58:40
Script end

Main resources:

Total runtime0.5565 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 587.8438180.8125
Module start 'content' 0.00670.4391 768.6563550.8672
Module end 'content' 0.44580.1106 1,319.5234332.7422
Script end 0.5564  1,652.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.7080210.0002
Check MTime0.00140.2526210.0001
Mysql Total
Database connection0.00090.166710.0009
Mysqli_queries0.487487.57661940.0025
Looping result0.00190.34741920.0000
Template Total0.528494.920.2642
Template load0.00190.346620.0010
Template processing0.526494.597020.2632
Template load and register function0.00010.018710.0001
states
state_id_array0.00080.146610.0008
state_identifier_array0.00110.205920.0006
Override
Cache load0.00160.2800240.0001
Sytem overhead
Fetch class attribute can translate value0.00480.864830.0016
Fetch class attribute name0.00160.288450.0003
XML
Image XML parsing0.00280.497930.0009
class_abstraction
Instantiating content class attribute0.00000.002460.0000
General
dbfile0.00571.0313340.0002
String conversion0.00000.001530.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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