Error Upgrading Multi site from 9.1.1 to 9.1.3

Hi, I’m trying to upgrade a multi-site installation from 9.1.1 to 9.1.3 and get an error:

Call to a member function getSiteHomePageObject() on null


                $data['pkgID'] = $pkg->getPackageID();
            $c = Page::addStatic($data, null);
            return $c;
    public static function createPageInTree($cPath, TreeInterface $tree, $moveToRoot = false, $pkg = null)
        $txt = Loader::helper('text');
        // trim off a leading / if there is one
        $cPath = trim($cPath, '/');
        // now we grab the parent collection, if there is a static one.
        $pages = explode('/', $cPath);
        $parent = $tree->getSiteTreeObject()->getSiteHomePageObject();
        // now we iterate through the pages  to ensure that they exist in the system before adding the new guy
        $pathPrefix = '';
        $checkGlobally = false;
        for ($i = 0; $i < count($pages); ++$i) {
            $currentPath = $pathPrefix . $pages[$i];
            if ($i == 0) {
                // First, we check the first path to see if it falls outside of the root already. If it does,
                // we're not going to check within the site for them
                $rootPage = CorePage::getByPath("/" . $currentPath);
                if (!$rootPage->isError() && $rootPage->getSiteTreeID() == 0) {
                    // That means we've already added this as a system page, like Dashboard, etc... Which means
                    // that we add the subsequent pages globally
                    $checkGlobally = true;
            $pathToFile = static::getPathToNode($currentPath, $pkg);


  1. “Call to a member function getSiteHomePageObject() on null”

Anyone know whats causing this? thanks

Hi @pvernaglia

Just to rule some things out, do you have multilingual enabled on this site?