Notice (1024) : Undefined property `CategoriesController::$TemplateCategories` in `/var/www/pogo.sodmos.si/src/Controller/Template/CategoriesController.php` on line 133 [in /var/www/pogo.sodmos.si/vendor/cakephp/cakephp/src/Controller/Controller.php, line 319]
Warning (512) : Unable to emit headers. Headers sent in file=/var/www/pogo.sodmos.si/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=37 [in /var/www/pogo.sodmos.si/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/pogo.sodmos.si/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/pogo.sodmos.si/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 163]
Warning (2) : Cannot modify header information - headers already sent by (output started at /var/www/pogo.sodmos.si/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:37) [in /var/www/pogo.sodmos.si/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Error: Call to a member function find() on null

Call to a member function find() on null 📋

Error
Error in: ROOT/src/Controller/Template/CategoriesController.php, line 133
APP/Controller/Template/CategoriesController.php at line 133 (edit)
            }
            $this->set(['hits' => $searchResult['hits'], 'searchTime' => $searchResult['execution_time']]);
        } else {
            $query $this->TemplateCategories->find()->select()
                ->where(['OR' => ['parent_id' => $parentId]])
                ->orderBy('no');
            if ($parentId == Configure::read('App.defaultCategory')) {