Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

The installer scripts of cjw_multisite

What cjw-multi-site-installer.php and cjw-starter-install.php do during an install, in the order they do it. The settings it starts from, the pre-install, the INI settings, roles and preferences, the post-install steps…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/site-packages/cjw-multisite/the-installer-scripts.md

On this page

The installer scripts of cjw_multisite

cjw_multisite builds its site with two PHP files in settings/ of the package: cjw-multi-site-installer.php (the class cjwMultiSiteInstaller, 5,939 lines) and cjw-starter-install.php (the starter content functions, 827 lines), with post-install-fix.php (593 lines) as a helper. This page follows an install through them in order. It is for developers who change the installer or write one like it; administrators reading a setup log find here what each step's notice means.

The file's header says where it comes from: "Generated from the 7x MultiSite installer (sevenx_multisite, sevenx-multi-site-installer.php) for the starter site of the cjw_themes_jumper extension". Most steps are therefore the same as in The multisite installer script; this page dwells on what is different.

Contents

  1. When the setup calls what
  2. The settings the installer starts from
  3. Before the packages: preInstall()
  4. INI settings, roles and preferences
  5. After the packages: the post-install steps
  6. The starter content steps
  7. Reading the log
  8. Related pages

When the setup calls what

The create sites step of the setup (kernel/setup/steps/ezstep_create_sites.php) loads the settings files of the site package and calls the functions they define, in this order:

OrderFunction (settings file)Installer method
1eZSitePreInstall() (install-scripts.php)preInstall()
2the kernel installs the required packages ($package->install())none
3eZSiteINISettings(), eZSiteAdminINISettings(), eZSiteCommonINISettings()siteINISettings(), adminINISettings(), commonINISettings()
4eZSiteRoles() (roles.php)siteRoles()
5eZSitePreferences() (preferences.php)sitePreferences()
6eZSitePostInstall( &$parameters ) (install-scripts.php)postInstall(), which runs the steps of initSteps()

The kernel's eZSiteInstaller::executeSteps() runs the post-install steps one after the other and stops the chain at the first step that reports an error, so the installer puts robust repairs early and cosmetic steps last.

The settings the installer starts from

initSettings() reads the parameters of the setup and fixes these values:

SettingValue
main_site_designstarter
user_siteaccessthe setup's choice, site when empty
admin_siteaccess, editor_siteaccessthe setup's choice (admin when empty), editor
adminui_siteaccessadminui when the exp_adminui extension is there and the kernel can make it, else empty
site_titlethe typed title; CJW JAC Exponential when it is empty, the package summary, CJW Multisite or Exponential
extension_listthe ActiveExtensions[] list: the same list as sevenx_multisite plus cjw_themes_jumper and cjw_tmv; cjw_tmv is dropped when extension/cjw_tmv is missing
language_siteaccess_mapone translation siteaccess per further language (see Siteaccesses and languages)
fallback_localeseng-US when the chosen languages lack it, unless the setup passes its own fallback_language_codes
var_dirvar/site

Before the packages: preInstall()

  1. Records the highest node id and object id of the base data (cjwBaseMaxNodeID, cjwBaseMaxObjectID), so the later node fix can tell base data from package content.
  2. Adds the attributes tags (ezkeyword) and publish_date (ezdatetime) to the class folder, named in the site's primary language.
  3. Sets [FileSettings] VarDir=var/site for the run and prepends the settings/ folder of every extension in the list (activateSiteExtensionSettings()), so datatypes such as those of enhancedselection2 and eztags are known while classes and objects are imported.
  4. Links the starter content's images and files from extension/cjw_themes_jumper/share/ into the content package (cjwLinkStarterFilesFromExtension()).
  5. Registers the datatypes ezsrrating, ezgmaplocation, ngenhancedlink and eztags for the run.
  6. Adds the two-step sign-in field to the user class when sevenx_authentication_2fa is available.
  7. Drops and recreates the tables of every extension schema (dropExtensionTables(), insertDBFile()): the named ones (ezstarrating, ezgmaplocation, eztags, explayouts, enhancedselection2, cjw_newsletter, syndication) plus every other listed extension with a share/db_schema.dba or sql/<engine>/schema.sql, and the admin access extensions. Tables only: no db_data.dba is loaded (declaredExtensionSchemas() passes false for every entry).
  8. Repairs the language columns of eztags rows from the base data when eng-GB exists.

INI settings, roles and preferences

MethodWrites
siteINISettings()settings/siteaccess/<site>/: menu, override, toolbar, site.ini (locale, SiteLanguageList, LoginPage=embedded, one session across the public siteaccesses), image, content, template, content structure menu, ODF
adminINISettings()settings/siteaccess/<admin>/: login required, ShowHiddenNodes=true, TranslationSA, ActiveAccessExtensions[] (expai, exp_adminui where present), menus, toolbar, overrides, icons
commonINISettings()settings/override/: AvailableSiteAccessList, SiteList, DefaultAccess, MatchOrder (uri;host, or uri;port for port access), ForceVirtualHost=true, ActiveExtensions[], the database settings of the chosen driver, cache headers for anonymous visitors (public, max-age=300) and more
siteRoles()policies for Anonymous and Member (rss feed, user/login on every served siteaccess except admin and adminui, content/read in section 3, tags/view, info-collection/read, osm_proxy/tiles) and the user2fa policies when two-step sign-in is available
sitePreferences()the administrator's admin panel preferences

The osm_proxy/tiles policy is specific to this package: the maps of the starter design load their tiles through the osm_proxy module of cjw_themes_jumper.

After the packages: the post-install steps

The steps of initSteps(), in order, grouped:

StepsWhat they do
postInstallFixContentObjectNameLanguages, postInstallResolveRelationListIds, postInstallImportNewsletterClassesRepairs of the imported data; the newsletter classes of cjw_newsletter
postInstallAdminSiteaccessINIUpdateAdmin design admin4l with admin4, admin3, admin2, admin after it; RootNode=2
postInstallUserSiteaccessINIUpdateThe user siteaccess: SiteDesign=starter, AdditionalSiteDesignList[]=standard, ExtensionSettingsSiteAccess=cjw_starter, start page, starter root, PathPrefix, TranslationSA; the override blocks of other extensions for a siteaccess of this name are taken out of use
createTranslationSiteAccesses, createSecondarySiteaccessesOne siteaccess per further language; no secondary siteaccesses
template look, swap and remove steps, createContentSection (Restricted), role policies, user groups (Partners, Members), role assignments, folder attribute namesAs in the 7x installer
setRSSExportThe feed my_feed ("My RSS Feed") of ng_article objects below the starter root
postInstallFixPackageNodesAndExplayoutsMaps package node and object ids to the installed ones (cjwFixPackageNodesAndExplayouts())
postInstallStarterContentThe starter content steps below
postInstallImportAdminLayoutsThe admin layouts from explayouts/share/fragments/admin_layouts_db_data.dba, ids from 100001 on, once
postInstallRegenerateURLAliases, postInstallCreateSitePrefixAliases, postInstallStarterPathsURL aliases, then the starter's own paths from cjw-paths.json
postInstallClearLinksToContentNotInstalledTitle block links to sections that are not installed are switched off
postInstallPlaceOrphanedPackageObjectsPlaces objects the package install left without a node, under the parent named in their object file
postInstallSetSiteHomeAndPrefixIndexPage, RootNode, RootNodeDepth and PathPrefix for the user siteaccess and its translations; menus copied to the translations
postInstallStarterPolicyPagesmenu.ini [SiteInfo] PrivacyPolicyID and CookiePolicyID to the privacy page (cjw-starter-n-809)
postInstallCloseInformationPagesOnPublicSiteaccessesThe ezinfo module is switched off on the public siteaccesses
postInstallResyncContentClassNames, postInstallRepairClassNameListsClass names keyed by a language
postInstallCreateAdminUISiteaccesssettings/siteaccess/adminui from the admin's files
postInstallEnableSearchStatsOnEverySiteaccessLogSearchStats=enabled
postInstallWriteMultisiteURLSettingssettings/override/ezurlmultisite.ini.append.php
two updateObjectAttributeFromString stepsThe logo and the site style on the template look object, deliberately last

The starter content steps

cjwInstallStarterContent( $siteaccesses ) runs as the administrator (user 14) and calls, in order:

PartFunctionEffect
class additionscjwEnsureStarterClassAdditions()Missing attributes from cjw-class-additions.xml
rich text referencescjwPostUnserializeStarterObjects()eZContentObject::postUnserialize() for every starter object, which the handler skips for remote ids that are not 32 characters long
linkscjwResolveStarterLinks()ngenhancedlink values get the target's object id
tagscjwFixStarterTags()The tag "Starter" and its tags, linked to the eztags fields
datescjwRestoreStarterDates()Publish and modify times from the package
hidden foldercjwHideStarterNodes()Hides cjw-starter-n-807
layoutscjwSeedStarterLayouts()The rows of cjw-explayouts.json, band 900000
file links removedcjwUnlinkStarterFilesFromExtension()Removes the links made before the install

Each part logs its result; a failed part is named in one error line, and the install carries on. All content caches are cleared at the end.

Reading the log

Notices to look for in the debug output of the install:

Base data before the content package: nodes up to ..., objects up to ...; content package cjw_multisite_democontent
Starter content files from the extension: <n> linked, <n> copied, <n> missing
Class additions of the starter content: <n> added, <n> present
Starter layouts: <n> rows in 10 tables, rules for <the user siteaccesses>
Starter paths: <n> renamed, <n> differences left

Warning

"Files of the starter content not found in extension/cjw_themes_jumper/share" means the extension is missing or incomplete: the images of the site will be missing too. Put the extension in place and install again.

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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x