Warning (2) : Attempt to read property "id" on null [in /data/web/virtuals/346431/virtual/www/src/Controller/PagesController.php, line 99]
Warning (512) : Unable to emit headers. Headers sent in file=/data/web/virtuals/346431/virtual/www/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=37 [in /data/web/virtuals/346431/virtual/www/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65]
Warning (2) : Cannot modify header information - headers already sent by (output started at /data/web/virtuals/346431/virtual/www/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /data/web/virtuals/346431/virtual/www/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159]
Warning (2) : Cannot modify header information - headers already sent by (output started at /data/web/virtuals/346431/virtual/www/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /data/web/virtuals/346431/virtual/www/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Error: Cake\ORM\Behavior\TreeBehavior::findChildren(): Argument #2 ($for) must be of type string|int, null given, called in /data/web/virtuals/346431/virtual/www/vendor/cakephp/cakephp/src/ORM/Table.php on line 2749

Cake\ORM\Behavior\TreeBehavior::findChildren(): Argument #2 ($for) must be of type string|int, null given, called in /data/web/virtuals/346431/virtual/www/vendor/cakephp/cakephp/src/ORM/Table.php on line 2749 📋

TypeError
Error in: CORE/src/ORM/Behavior/TreeBehavior.php, line 448
CORE/src/ORM/Behavior/TreeBehavior.php at line 448 (edit)
     * @param bool $direct Whether to return only the direct (true) or all children (false).
     * @return \Cake\ORM\Query\SelectQuery
     * @throws \InvalidArgumentException When the 'for' key is not passed in $options
     */
    public function findChildren(SelectQuery $queryint|string $forbool $direct false): SelectQuery
    {
        $config $this->getConfig();
        [$parent$left$right] = array_map(
            function ($field) {

If you want to customize this error message, create templates/Error/error500.php