Phalcon Framework 3.4.5

Error: Call to a member function getClubsId() on boolean

/srv/www/chroot/site05/web/app/backend/controllers/cms/ContentElementRdbController.php (1878)
#0RNTForest\cms\controllers\ContentElementRdbController->renderIndividualRanking(Object(RNTForest\cms\models\ContentElementRdb: ))
#1call_user_func(Array([0] => Object(RNTForest\cms\controllers\ContentElementRdbController), [1] => renderIndividualRanking), Object(RNTForest\cms\models\ContentElementRdb: ))
/srv/www/chroot/site05/web/vendor/rnt-forest/cms/controllers/CmsPageDefaultController.php (43)
<?php
/**
* @copyright Copyright (c) ARONET GmbH (https://aronet.swiss)
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program.  If not, see <http://www.gnu.org/licenses/>
*
*/
 
namespace RNTForest\cms\controllers;
 
use \RNTForest\cms\models\PageTree;
 
class CmsPageDefaultController extends \RNTForest\cms\controllers\CmsPageControllerBase
{
    /**
    * Render the Page
    * 
    * @param \RNTForest\cms\models\CmsPageTreeBase $page
    */
    public function render($page){
 
        // first generate page content because there is only one simple view available
        $pageContent = '';                
        
        /* @var RNTForest\cms\models\CmsContentElementsBase $contentElement */
        foreach($page->getContentElements() as $contentElement){
            if(!$contentElement->isVisible()) continue;
            $controllerName = '\\RNTForest\\cms\\controllers\\'.$contentElement->getType()."Controller";
            $controller = new $controllerName();
            $this->simpleview->contentElement = $contentElement;
            if(!empty($contentElement->getFunction())){
                $this->simpleview->contentElementContent = call_user_func([$controller, $contentElement->function],$contentElement);
            } else {
                $this->simpleview->contentElementContent = "Error: no function in content element ".$contentElement->type." declared!";
            }
            $pageContent .= $this->simpleview->render("partials/cms/cms_content_elements/contentElement.volt");
        }
 
        $this->simpleview->pageTitle = $page->getTitle();
        $this->simpleview->showPageTitle = $page->getShowPageTitle();
        
        $pageRowsCount = \RNTForest\cms\models\CmsContentElementsBase::find('cms_page_tree_id = '.$page->id.' AND type = "ContentElementRow" AND hidden = 0')->count();
        $this->simpleview->pageRowsCount = $pageRowsCount;
        
        $this->simpleview->pageContent = $pageContent;
        $this->simpleview->pageId = $page->getId();
        if($this->view->exists("cms_pages/page")){
            return $this->simpleview->render("cms_pages/page");    
        }else{
            return $this->simpleview->render("partials/cms/cms_pages/page");    
        }   
    }
}
#2RNTForest\cms\controllers\CmsPageDefaultController->render(Object(RNTForest\cms\models\CmsPageTree: [tree_lft] => 42, [tree_rgt] => 43, [tree_level] => 4))
/srv/www/chroot/site05/web/app/cms/phalcon_scripts/BaseScript.php (51)
<?php
/**
* @copyright Copyright (c) ARONET GmbH (https://aronet.swiss)
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program.  If not, see <http://www.gnu.org/licenses/>
*
*/
 
namespace RNTForest\cms\phalcon_scripts;
 
use Phalcon\Mvc\Controller;
use Phalcon\Mvc\DispatcherInterface;
use Phalcon\DI\FactoryDefault as PhDi;
 
use \RNTForest\cms\models\CmsPageTree;
 
class BaseScript extends Controller
{
    protected $acitvePage;
    
    public function initialize(){
        // global config
        $di = PhDi::getDefault();
        $config = $di['config'];
    }
    
    public function run($page){
        // get active page object
        $this->activePage = CmsPageTree::findFirst($this->session->get('CmsControllerBase')['activePage']);
        
        // generate the menu
        $menu = array();
        foreach(CmsPageTree::find(['tree_level = 3 AND active = 1 AND hidden = 0','order'=>'tree_lft']) as $menuPage){
            $menu[] = $this->buildMenu($menuPage);
        }
        
        // render page and get the content
        $controllerName = '\\RNTForest\\cms\\controllers\\'.$page->getType()."Controller";
        $controller = new $controllerName();
        $content = $controller->render($page);  
        
        $this->view->menu = $menu;
        $this->view->page = $page;
        $this->view->content = $content;
        
        // get images for carousel
        //todo:  get images   
        $image_urls = array(); 
        $path=BASE_PATH.$this->config->fileadmin->path.'Karussell/'; 
        $images = scandir($path);    
        foreach($images AS $image){
            if($image == '.' || $image == '..')continue;
            $image_urls[] ='/fileadmin/Karussell/'.$image;    
        }                                                                  
        $this->view->carouselImages = $image_urls;      
        
        // todo: assign footer menus
        $this->view->footerMenuLeft =   [0 => ['title'=>'left-menu']];
        $this->view->footerMenuMiddle = [0 => ['title'=>'middle-menu']];
        $this->view->footerMenuRight =  [0 => ['title'=>'right-menu']];
    }
    
    /**
    * build menu
    * 
    * @param \RNTForest\cms\models\CmsPageTreeBase $page
    */
    protected function buildMenu($page){
        $menu = array();
        
        // prepare page array
        $pageArray = array();
        $pageArray['title'] = $page->title;
        $pageArray['id'] = $page->id;
        $pageArray['type'] = $page->type;
        $pageArray['target'] = "_self";
        if(($page->type == 'CmsPageLink' || $page->type == 'CmsPageSwfeManualLink') && $page->getConfig()['extern'] == 1){
            $pageArray['target'] = "_blank";
        }
        $pageArray['href'] = $page->href;
        $pageArray['active'] = false;
        $pageArray['toggled'] = false;
        if($this->activePage->id == $page->id){
            $pageArray['active'] = true;
            $pageArray['toggled'] = true;
        }
        if($this->activePage->isDescendantOf($page)){
            $pageArray['toggled'] = true;
        }
        
        // get children of this page
        foreach($page->children() as $child){
            if(!$child->isVisible()) continue;
            
            $children = $this->buildMenu($child);
            $pageArray['children'][] = $children;
        }
        $menu = $pageArray;
        
        return $menu;
    }
}
#3RNTForest\cms\phalcon_scripts\BaseScript->run(Object(RNTForest\cms\models\CmsPageTree: [tree_lft] => 42, [tree_rgt] => 43, [tree_level] => 4))
/srv/www/chroot/site05/web/vendor/rnt-forest/cms/controllers/CmsControllerBase.php (65)
<?php
/**
* @copyright Copyright (c) ARONET GmbH (https://aronet.swiss)
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program.  If not, see <http://www.gnu.org/licenses/>
*
*/
 
namespace RNTForest\cms\controllers;
 
use \RNTForest\cms\models\CmsPageTree;
 
class CmsControllerBase extends \Phalcon\Mvc\Controller
{
    public function initialize(){
        // global config
        $di = \Phalcon\DI::getDefault();
        $config = $di['config'];
 
        // default page title icon
        $this->view->pageTitleIcon = '<i class="fa-fw fa fa-home"></i>';
 
        // application name
        $this->view->appTitle = $config->application['appTitle'];
        
        // base URL
        $this->view->baseUrl = $config->application['baseUrl'];
    }
    
    public function renderAction($pageIdUrl){
 
        // presave the query string for further use (just a test!)
        $query = $this->request->getQuery();
 
        if(is_numeric($pageIdUrl)){
            // try to find the page with this id
            $pageIdUrl = $this->filter->sanitize($pageIdUrl,'int');
            $page = CmsPageTree::findFirst($pageIdUrl);
        }else{
            // try to find a matching url
            $pageIdUrl = $this->filter->sanitize($pageIdUrl,['trim','string','striptags']);
            $page = CmsPageTree::findFirst("url = '".$pageIdUrl."'");
        }
 
        // no page found or inactive
        if(!$page || !$page->active) return $this->forwardTo404();
 
        // save current page to session
        $this->session->set('CmsControllerBase',['activePage' => $page->getId()]);
 
        // execute given script from page to pass everything to the view
        $scriptName = $page->getActiveScript();
        $script = new $scriptName();
        $script->run($page);
 
        // set layout depending on page
        $layout = $page->getActiveLayout();
        $this->view->setLayoutsDir($this->config->cms['layoutDir']);
        $this->view->setLayout($layout);
    }
 
    public function redirectTo($path){    
        $this->response->redirect($path);    
        $this->view->disable();     
    }    
 
    public function forwardTo401(){    
        return $this->dispatcher->forward(array(    
            "controller" => "errors",    
            "action" => "show401"    
        ));    
    }    
 
    public function forwardTo404(){    
        return $this->dispatcher->forward(array(    
            "controller" => "errors",    
            "action" => "show404"    
        ));    
    }
}
#4RNTForest\cms\controllers\CmsControllerBase->renderAction(individual_ranking)
#5Phalcon\Dispatcher->callActionMethod(Object(RNTForest\RDB\frontend\controllers\CmsController), renderAction, Array([pageIdUrl] => individual_ranking))
#6Phalcon\Dispatcher->dispatch()
#7Phalcon\Mvc\Application->handle(null)
/srv/www/chroot/site05/web/public/index.php (86)
<?php
/**
* @copyright Copyright (c) ARONET GmbH (https://aronet.swiss)
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program.  If not, see <http://www.gnu.org/licenses/>
*
*/
 
//debug
ini_set('display_errors', "On");
error_reporting(E_ALL);
$debug = new \Phalcon\Debug();
$debug->listen();
 
// locales
setlocale(LC_ALL,"de_CH.utf8");
 
// paths
define('BASE_PATH', dirname(__DIR__));
define('APP_PATH', BASE_PATH . '/app');
define('VENDOR_PATH', BASE_PATH . '/vendor');
define('FRONTEND_PATH', APP_PATH . '/frontend');
define('BACKEND_PATH', APP_PATH . '/backend');
 
try {
    // check the environment
    if(!file_exists(BASE_PATH."/libraries")) mkdir(BASE_PATH."/libraries",0770,true);
    if(!file_exists(BASE_PATH."/cache/volt")) mkdir(BASE_PATH."/cache/volt",0770,true);
    if(!file_exists(BASE_PATH."/cache/pdf")) mkdir(BASE_PATH."/cache/pdf",0770,true);
    if(!file_exists(BASE_PATH."/logs")) mkdir(BASE_PATH."/logs",0770,true);
    if(!file_exists(BASE_PATH."/public/gfx")) mkdir(BASE_PATH."/public/gfx",0770,true);
    if(!file_exists(BASE_PATH."/public/assets/css")) mkdir(BASE_PATH."/public/assets/css",0770,true);
    if(!file_exists(BASE_PATH."/public/assets/js")) mkdir(BASE_PATH."/public/assets/js",0770,true);
    if(!file_exists(BACKEND_PATH."/mail")) mkdir(BACKEND_PATH."/mail",0770,true);
    if(!file_exists(BACKEND_PATH."/views/templates")) mkdir(BACKEND_PATH."/views/templates",0770,true);
    if(!file_exists(BACKEND_PATH."/views/partials")) mkdir(BACKEND_PATH."/views/partials",0770,true);
    if(!file_exists(FRONTEND_PATH."/views/partials")) mkdir(FRONTEND_PATH."/views/partials",0770,true);
    if(!file_exists(BACKEND_PATH."/views/templates/core")) symlink("../../../../vendor/rnt-forest/core/views/templates",BACKEND_PATH."/views/templates/core");
    if(!file_exists(BACKEND_PATH."/views/partials/core")) symlink("../../../../vendor/rnt-forest/core/views",BACKEND_PATH."/views/partials/core");
    if(!file_exists(BACKEND_PATH."/views/partials/cms")) symlink("../../../../vendor/rnt-forest/cms/views",BACKEND_PATH."/views/partials/cms");
    if(!file_exists(FRONTEND_PATH."/views/partials/cms")) symlink("../../../../vendor/rnt-forest/cms/views",FRONTEND_PATH."/views/partials/cms");
 
    // Bootstrap
    include APP_PATH . "/bootstrap.php";
 
    // Handle the request
    $application = new \Phalcon\Mvc\Application($di);
 
    // Register application modules
    $application->registerModules(
        [
            'frontend' => [
                'className' => 'RNTForest\RDB\frontend\module',
                'path'      => '../app/frontend/Module.php'
            ],
            'backend'  => [
                'className' => 'RNTForest\RDB\backend\module',
                'path'      => '../app/backend/Module.php'
            ]
        ]
    );       
 
    // Assets collection
    $application->assets->collection('cssHeader')
    ->setPrefix($application->config->application->baseUrl);
 
    $application->assets->collection('jsHeader')
    ->setPrefix($application->config->application->baseUrl);
 
    $application->assets->collection('jsFooter')
    ->setPrefix($application->config->application->baseUrl);
 
    // Render content
    // NGINX - PHP-FPM already set PATH_INFO variable to handle route
    $content = $application->handle(!empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : null)->getContent();
 
    // Generate assets
    $application->assetsHelper->generateAllRessourceFiles();
 
    // Output content
    echo $content;
} catch (\Exception $e) {
    echo $e->getMessage() . '<br>';
    echo '<pre>' . $e->getTraceAsString() . '</pre>';
}
?>    
KeyValue
_url/individual_ranking
ceSingleClassArray ( [season] => 19 [league] => 1L [format] => xls )
KeyValue
TEMP/tmp
TMPDIR/tmp
TMP/tmp
PATH/usr/local/bin:/usr/bin:/bin
HOSTNAMEdedi3040
USERswfe
HOME/home/swfe
HTTP_CONNECTIONKeep-Alive
HTTP_HOSTswisswrestling.ch
HTTP_ACCEPT_ENCODINGbr,gzip
HTTP_IF_MODIFIED_SINCEThu, 20 Feb 2020 19:55:02 GMT
HTTP_ACCEPT_LANGUAGEen-US,en;q=0.5
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
REDIRECT_STATUS200
SERVER_NAMEswisswrestling.ch
SERVER_PORT443
SERVER_ADDR185.35.28.72
REMOTE_PORT43472
REMOTE_ADDR34.234.223.162
SERVER_SOFTWAREnginx/1.10.3
GATEWAY_INTERFACECGI/1.1
HTTPSon
REQUEST_SCHEMEhttps
SERVER_PROTOCOLHTTP/1.1
DOCUMENT_ROOT/srv/www/chroot/site05/web/public
DOCUMENT_URI/index.php
REQUEST_URI/individual_ranking?ceSingleClass%5Bseason%5D=19&ceSingleClass%5Bleague%5D=1L&ceSingleClass%5Bformat%5D=xls
SCRIPT_NAME/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHODGET
QUERY_STRING_url=/individual_ranking&ceSingleClass%5Bseason%5D=19&ceSingleClass%5Bleague%5D=1L&ceSingleClass%5Bformat%5D=xls
SCRIPT_FILENAME/srv/www/chroot/site05/web/public/index.php
FCGI_ROLERESPONDER
PHP_SELF/index.php
REQUEST_TIME_FLOAT1600537613.6239
REQUEST_TIME1600537613
#Path
0/srv/www/chroot/site05/web/public/index.php
1/srv/www/chroot/site05/web/app/bootstrap.php
2/srv/www/chroot/site05/web/vendor/rnt-forest/core/config/baseConfig.php
3/srv/www/chroot/site05/web/vendor/rnt-forest/cms/config/baseConfig.php
4/srv/www/chroot/site05/web/app/config/config.php
5/srv/www/chroot/site05/web/app/backend/config/permissionbase.php
6/srv/www/chroot/site05/web/vendor/rnt-forest/core/config/permissionbase.php
7/srv/www/chroot/site05/web/vendor/rnt-forest/cms/config/permissionbase.php
8/srv/www/chroot/site05/web/app/frontend/Module.php
9/srv/www/chroot/site05/web/vendor/autoload.php
10/srv/www/chroot/site05/web/vendor/composer/autoload_real.php
11/srv/www/chroot/site05/web/vendor/composer/ClassLoader.php
12/srv/www/chroot/site05/web/vendor/composer/autoload_static.php
13/srv/www/chroot/site05/web/app/frontend/config/config.php
14/srv/www/chroot/site05/web/app/frontend/controllers/CmsController.php
15/srv/www/chroot/site05/web/vendor/rnt-forest/cms/controllers/CmsControllerBase.php
16/srv/www/chroot/site05/web/app/backend/models/cms/CmsPageTree.php
17/srv/www/chroot/site05/web/vendor/rnt-forest/cms/models/CmsPageTreeBase.php
18/srv/www/chroot/site05/web/vendor/rnt-forest/core/models/TreeBase.php
19/srv/www/chroot/site05/web/vendor/rnt-forest/core/models/ModelBase.php
20/srv/www/chroot/site05/web/vendor/rnt-forest/core/libraries/NestedSet.php
21/srv/www/chroot/site05/web/vendor/phalcon/incubator/Library/Phalcon/Traits/EventManagerAwareTrait.php
22/srv/www/chroot/site05/web/app/cms/phalcon_scripts/BaseScript.php
23/srv/www/chroot/site05/web/vendor/rnt-forest/cms/controllers/CmsPageDefaultController.php
24/srv/www/chroot/site05/web/vendor/rnt-forest/cms/controllers/CmsPageControllerBase.php
25/srv/www/chroot/site05/web/vendor/rnt-forest/cms/models/CmsContentElementsBase.php
26/srv/www/chroot/site05/web/app/backend/models/cms/ContentElementRdb.php
27/srv/www/chroot/site05/web/app/backend/controllers/cms/ContentElementRdbController.php
28/srv/www/chroot/site05/web/vendor/rnt-forest/cms/controllers/CmsContentElementsControllerBase.php
29/srv/www/chroot/site05/web/app/backend/models/RdbMmk.php
30/srv/www/chroot/site05/web/app/backend/models/RdbEkm.php
31/srv/www/chroot/site05/web/app/backend/models/RdbWrestlers.php
32/srv/www/chroot/site05/web/app/backend/models/RdbClubs.php
Memory
Usage6291456