You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have cli script that installs and configures Craft 3 and since we updated craft to 3.1.8 it has stopped working properly. After investigating we figured the our problem was the new static $siteUidMap that is used to store each site uid. When Craft installs, the static variable is filled with the uid of the default site. So when we decide to programmatically add a new site and create a section for it, it does not exist in the static $siteUidMap array causing an undefined index '2' at line 233.
Steps to reproduce
Install craft programatically using the $app->runAction. This at some point uses the ElementHelper::supportedSitesForElement function therefore populating the static $siteUidMaphere.
Create a new site with the same group id used in the default one. When we do this, there should be a way to inform the static $siteUidMap about this new site.
Description
We have cli script that installs and configures Craft 3 and since we updated craft to 3.1.8 it has stopped working properly. After investigating we figured the our problem was the new
static $siteUidMap
that is used to store each site uid. When Craft installs, the static variable is filled with the uid of the default site. So when we decide to programmatically add a new site and create a section for it, it does not exist in thestatic $siteUidMap
array causing an undefined index '2' at line 233.Steps to reproduce
$app->runAction
. This at some point uses theElementHelper::supportedSitesForElement
function therefore populating thestatic $siteUidMap
here.static $siteUidMap
about this new site.Additional info
The text was updated successfully, but these errors were encountered: