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.