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

Upgrading: siteaccess switches and siteaccess matching

This page describes how switching from one siteaccess to another behaves now, for processes that serve or work for more than one siteaccess (previews, cronjobs, workers).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/bc/6.0/siteaccess-switch-and-matching.md

On this page

Upgrading: siteaccess switches and siteaccess matching

This page describes how switching from one siteaccess to another behaves now, for processes that serve or work for more than one siteaccess (previews, cronjobs, workers).

A switch takes the regional settings of the new siteaccess

eZSiteAccess::load() on the global path now resets the translations, ezpI18n and the memoized default content language, so they are built again from the [RegionalSettings] of the loaded siteaccess. Before, a process that loaded another siteaccess kept the interface language, the translation tables and the default content language of the siteaccess before. Code that reset these itself after a switch may keep doing so; it is now redundant.

change() to another siteaccess is a full switch

eZSiteAccess::change() called while a siteaccess is current, with another siteaccess name and no local site.ini instance, now runs eZSiteAccess::load(): the settings, the access extensions and the module repositories of the siteaccess before are dropped and those of the new one are applied. The first call of a process, a call with the name of the current siteaccess (a change of type or URI part) and every call with a $siteINI instance keep the bootstrap step as before. A cronjob that loops over siteaccesses with change() now sees the settings of each one.

A failed load keeps the current siteaccess

When eZSiteAccess::load() throws, the siteaccess that was current before is current again (or none, if there was none). A failed global load may leave the settings partly switched, because the settings before were already discarded.

The cron language mode stays across a switch

eZContentLanguage::setCronjobMode() is a property of the process, not a cache: eZContentLanguage::expireCache() and a siteaccess switch no longer turn it off. A script that sets the mode before it initialises a siteaccess now keeps it, so it sees every content language. The cron runner no longer turns the mode on before the parts run: each part sees the language list of the siteaccess it runs in, and a part that needs every language calls setCronjobMode() itself.

Matching

  • host_uri: the uri part of a HostUriMatchMapItems entry is compared as literal text and matches whole leading segments of the path. Before, it was used inside a pattern: . meant any character, + and * were quantifiers, and a part such as eng also matched /eng-us or /eng.html (any non-word character ended the match). Entries that relied on this now need one entry per segment.
  • RedirectOnNormalize=enabled redirects only siteaccesses matched on the URI, to the cleaned name followed by the rest of the path. A match on the host, the port, the index file or host_uri is no longer redirected, and the rest of the path is no longer dropped. The status line follows the protocol of the request, HTTP/1.1 where the server reports none.
  • An unset URIMatchSubtextPre/Post, HostMatchSubtextPre/Post or IndexMatchSubtextPre/Post counts as empty and no longer stores an Undefined variable message in the debug output.

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