Forums / Extensions / eZ Flow / zone.ini override

zone.ini override

Author Message

Theodoros Papageorgiou

Tuesday 25 January 2011 5:02:57 am

Hi,

How can I override the default zone.ini in /extension/ezflow/settings/

I've tried to place it in /extension/ezflow/settings/siteaccess/my_siteaccess/ but the default is always loaded.

Thanks

WEBWiZ
Web Development
http://www.webwiz.gr

Franck Magnan

Tuesday 25 January 2011 5:39:35 am

Hello Theodoros,

if you need to override configuration file from an extension, you must place your zone.ini.append.php in settings/override folder.

--
Developer at Open Wide

Theodoros Papageorgiou

Tuesday 25 January 2011 8:50:00 am

Thanks for your answer Franck,

It works by placing it in the settings/override folder.
However, I'm working on a multisite installation and I'd like to override it for each siteaccess independently.

Any ideas?

WEBWiZ
Web Development
http://www.webwiz.gr

Franck Magnan

Tuesday 25 January 2011 11:34:05 am

You cannot override each siteaccess independently.

Order of overrides is:
override > extension > siteaccess
So, since zone.ini is in an extension, you cannot override it in siteaccess nor extension, you can just override it by the settings/override folder. I've got the same problem with ezjscore.ini. I wanted to have different javascript library in frontend and backend siteaccesses.
It is not possible in standard way but a hack exists.
Do you know which instruction you need to override?
You can delete this instruction in /extension/ezflow/settings/zone.ini and add it in:

  • /extension/ezflow/settings/siteaccess/my_siteaccess1/zone.ini.append.php
  • /extension/ezflow/settings/siteaccess/my_siteaccess2/zone.ini.append.php
  • /extension/ezflow/settings/siteaccess/my_siteaccess3/zone.ini.append.php

with different values.
It works but be careful, you will not upgrade ezflow easily after that.

--
Developer at Open Wide

Gaetano Giunta

Wednesday 26 January 2011 2:02:24 am

"

[...]

So, since zone.ini is in an extension, you cannot override it in siteaccess nor extension, you can just override it by the settings/override folder. [...]

"

This is not exactly true.

If you are careful about loading order of your extensions, settings in one extension can take precedence over settings from another one.

Support for this has improved in 4.4, since now extensions can declare their dependencies and have the correct loading order automatically calculated

Principal Consultant International Business
Member of the Community Project Board

Theodoros Papageorgiou

Wednesday 26 January 2011 3:57:14 am

Thanks Gaetano,

It worked after placing the override file in extension/my_extension/settings/zone.ini.append.php

The ini override order is the following as copied from Nicolas Pastorino's post in this thread:

  1. settings/*.ini
  2. extension/<extension_name>/settings/siteaccess/<siteaccess_name>/*.ini.append.php
  3. settings/siteaccess/<siteaccess_name>/*.ini.append.php
  4. extension/<extension_name>/settings/*.ini.append.php
  5. settings/override/*.ini.append.php

WEBWiZ
Web Development
http://www.webwiz.gr

Franck Magnan

Wednesday 26 January 2011 4:51:44 am

Hello Gaetano,
thanks for your precision. I'm developping an extension which works only with jquery et I tried to set PreferredLibrary to "jquery" in extension/<my_extension>/settings/ezjscore.ini.append.php but javascript main library remains "yui3".
I'm going to try again in 4.4 with an xml dependency file to see what happens.

--
Developer at Open Wide