[Emergency] Uncaught TypeError: Argument 1 passed to SilverStripe\CMS\Controllers\ModelAsController::controller_for() must be an instance of SilverStripe\CMS\Model\SiteTree, null given, called in /srv/users/allremove/apps/allremove-silverstripe-4-7-2/public/app/code/Pages/Page.php on line 395

GET /en_gb/cleaning/

Line 40 in /srv/users/allremove/apps/allremove-silverstripe-4-7-2/public/vendor/silverstripe/cms/code/Controllers/ModelAsController.php

Source

31 
32     /**
33      * Get the appropriate {@link ContentController} for handling a {@link SiteTree} object, link it to the object and
34      * return it.
35      *
36      * @param SiteTree $sitetree
37      * @param string $action
38      * @return ContentController
39      */
40     public static function controller_for(SiteTree $sitetree, $action = null)
41     {
42         $controller = $sitetree->getControllerName();
43 
44         if ($action && class_exists($controller . '_' . ucfirst($action ?? ''))) {
45             $controller = $controller . '_' . ucfirst($action ?? '');
46         }

Trace