eZ Community » Forums » Extensions » eZJscore and ActiveAccessExtensions
expandshrink

eZJscore and ActiveAccessExtensions

eZJscore and ActiveAccessExtensions

Friday 22 February 2013 5:37:23 pm - 1 reply

Hi,
I have a problem with ActiveAccessExtensions and ezjscore on ezpublish 4.3.
The site I work on uses a different siteaccess for each country it is available in.
The siteaccesses are defined in an extension I'll call MySite, in extensions/mysite/settings/siteaccess/[country].
A number of settings are common for countries in the same geographical area, so I made several extensions called mysite_europe, mysite_africa and so on.
I define thoses settings in extensions/mysite_africa/settings/mysite.ini.append.php
In extensions/mysite/settings/siteaccess/[country], I activate the mysite_africa extension: ActiveAccessExtensions[]=mysite_africa.
It works well except in one case: when a javascript function uses ezjscore/call, it seems the mysite_africa settings are not loaded.
I tried to add the following code on the beginning of extensions/ezjscore/modules/ezjscore/call.php:
$ini = eZINI::instance( 'mysite.ini' );
$mysettings = $ini->variable( 'MySettingsGroup','MySettings' );
var_dump($mysettings);
eZExecution::cleanExit();
When I make a request to uri ezjscore/call, it displays "bool(false)", and in error.log I get "Undefined group: 'MySettingsGroup' in mysite.ini", so it's not overriden by another ini.
If I display the value of ActiveAccessExtensions, the extension mysite_africa is defined.
If I write the same code at the beginning of extensions/ezjscore/modules/ezjscore/hello.php, it shows the settings value defined in extensions/mysite_africa/settings/mysite.ini.append.php.
I don't understand how two functions of the same module of the same extension can handle these settings differently?
Anyone have an idea of what happens, and how I could have ezjscore/call to load my settings?
Thanks.

Monday 25 February 2013 9:58:45 am

Found, in index_ajax.php:

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

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from