Extension load order
Part 3, chapter 5. When two extensions ship the same setting, the same template path or the same override, one of them wins. Which one depends on the load order. This chapter explains how the order is made and how to control it.
The rule
An extension earlier in the load order has the higher priority: its settings win, and its design folders are searched first. So the extension that should win is listed first.
Where the order comes from
The written order:
ActiveExtensions[]in the order the settings files list them, followed by the siteaccess'sActiveAccessExtensions[].Declared dependencies: with
site.ini [ExtensionSettings] ExtensionOrdering=enabled(the default) the kernel sorts the list by the<dependencies>of eachextension.xml(eZExtension::extensionOrdering()):Your extension.xmlsaysEffect <requires><extension name="x"/></requires>xloads before yours<uses><extension name="x"/></uses>xloads before yours<extends><extension name="x"/></extends>yours loads before x, and so wins over itExtensions with no relation to each other keep their written order. A cycle of dependencies cannot be sorted; the written order is used then.
Practical consequences
| You want | Do |
|---|---|
| Your site's settings extension to win over everything | list it first in ActiveExtensions[] |
| Your theme to override another theme's templates | declare <extends> on it in your extension.xml, or list yours earlier |
| A library extension available before yours | declare <requires> |
See the real order
./console exp:ini get site.ini/ExtensionSettings/ActiveExtensionsprints the written order. Setup > Extensions shows, on each card, "Loads as number n" when the real position
differs from the written one, and lists dependency problems. From PHP, eZExtension::activeExtensions() returns the
order the kernel uses.
The design chain shows the effect on templates directly; the script in The design chain prints it.
Extensions in more than one folder
Since July 2026 extensions can live in more than one folder:
[ExtensionSettings]
AdditionalExtensionDirectories[]
AdditionalExtensionDirectories[]=extension_srcextension/ stays the first folder; the extra folders are searched after it. A typical split keeps installed
extensions in extension/ and your own in extension_src/. Activation and load order do not change: an extension is
named by its folder name, wherever it lives. See
Extensions in more than one folder.
Related pages
- Previous: Activating an extension
- Next: composer.json for an extension
- Extension loading order and safe saving
- extension.xml: metadata and dependencies
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.