Undefined index: order
/mnt/devel/Atrium/atriumstudio/vendor/onionCMS/Modules/Projects/Controllers/AdminProjectsController.php
http://www.atriumarchitekti.loc/admin/project/create (POST)
Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0
578 array_key_exists("has", $category) === false579 or $category["has"] !== "on"580 ) {581 $this->services->projectsCategoriesRelationsModel->delete(array(582 array("project", $projectId),583 array("category", $categoryId),584 ));585 var_dump($category);586 continue;587 }588589 if (array_key_exists($categoryId, $current) === false) {590 $relationModel = $this->services->getFactory("projectsCategoriesRelationsModel")->create();591 } else {592 $relationModel = $current[$categoryId];593 }594595 $relationModel["project"] = $projectId;596 $relationModel["category"] = $categoryId;597 $relationModel["order"] = (strlen($category["order"]) === 0) ? NULL : $category["order"];598 $relationModel["main"] = ($categoryId == $main) ? 1 : 0;599 $relationModel->save();600 }601602 $current = $this->services->projectsCategoriesRelationsModel->fetchMultiple(array(603 array("project", $projectId),604 ));605 return;606 }607 }
578 array_key_exists("has", $category) === false579 or $category["has"] !== "on"580 ) {581 $this->services->projectsCategoriesRelationsModel->delete(array(582 array("project", $projectId),583 array("category", $categoryId),584 ));585 var_dump($category);586 continue;587 }588589 if (array_key_exists($categoryId, $current) === false) {590 $relationModel = $this->services->getFactory("projectsCategoriesRelationsModel")->create();591 } else {592 $relationModel = $current[$categoryId];593 }594595 $relationModel["project"] = $projectId;596 $relationModel["category"] = $categoryId;597 $relationModel["order"] = (strlen($category["order"]) === 0) ? NULL : $category["order"];598 $relationModel["main"] = ($categoryId == $main) ? 1 : 0;599 $relationModel->save();600 }601602 $current = $this->services->projectsCategoriesRelationsModel->fetchMultiple(array(603 array("project", $projectId),604 ));605 return;606 }607 }
array ( 0 => 8, 1 => 'Undefined index: order', 2 => '/mnt/devel/Atrium/atriumstudio/vendor/onionCMS/Modules/Projects/Controllers/AdminProjectsController.php', 3 => 597, 4 => array ( 'projectId' => 278, 'categories' => array ( 1 => array ( 'order' => '', ), 2 => array ( 'order' => '', ), 11 => array ( 'order' => '', ), 4 => array ( 'order' => '', ), 10 => array ( 'order' => '', ), 9 => array ( 'order' => '', ), 6 => array ( 'order' => '', ), 15 => array ( 'order' => '', ), 14 => array ( 'order' => '', ), 12 => array ( 'order' => '', ), 13 => array ( 'order' => '', ), '' => array ( 'has' => 'on', ), ), 'current' => array ( ), 'main' => 'NULL', 'category' => array ( 'has' => 'on', ), 'categoryId' => '', 'sql' => 'UPDATE projects_categories_relations SET main = 0 WHERE main = 1 AND project = 278', 'relationModel' => 'object (onionCMS\\Modules\\Projects\\Models\\ProjectsCategoriesRelationsModel)', ), )
418 $this->services->db419 ->table('projects_photos')420 ->where('project', $projectModel['id'])421 ->delete();422423 $photosIds = trim($formData['photos'], ',');424 if (empty($photosIds) === false) {425 $photosIds = explode(',', $photosIds);426 foreach ($photosIds as $order => $photoId) {427 $type = 'auto';428 if (isset($types[$photoId]) === true) {429 $type = $types[$photoId];430 }431432 $projectModel->addPhoto($photoId, $order, $type);433 }434 }435436 $categories = $_POST["categories"];437 $this->saveCategories($projectModel["id"], $categories);438439 $this->app->addFlash('Projekt bol uložený.');440441 if ($this->app->request->isAjax() === true442 OR $return === true) {443444 return;445 }446447 $data = array(
array ( 0 => 278, 1 => array ( 1 => array ( 'order' => '', ), 2 => array ( 'order' => '', ), 11 => array ( 'order' => '', ), 4 => array ( 'order' => '', ), 10 => array ( 'order' => '', ), 9 => array ( 'order' => '', ), 6 => array ( 'order' => '', ), 15 => array ( 'order' => '', ), 14 => array ( 'order' => '', ), 12 => array ( 'order' => '', ), 13 => array ( 'order' => '', ), '' => array ( 'has' => 'on', ), ), )
372 }373374 $this->submitter = $button;375376 $arguments = array($this->getValues());377 if (count($button['on_click']) === 4) {378 $args = (array) array_pop($button['on_click']);379 $arguments = array_merge($arguments, $args);380 }381382 $onValidForm = true;383 if (count($button['on_click']) === 3) {384 $onValidForm = array_pop($button['on_click']);385 }386387 if (($this->isValid === true388 AND $onValidForm === true)389 OR $onValidForm === false) {390391 call_user_func_array($button['on_click'], $arguments);392 }393 }394 }395396 /**397 * Metóda na uloženie aktuálneho prvku do poľa s prvkami formulára398 * a vytvorenie nového prázdneho aktuálneho prvku399 *400 * @return void401 */
array ( 0 => array ( 0 => 'object (onionCMS\\Modules\\Projects\\Controllers\\AdminProjectsController)', 1 => 'save', ), 1 => array ( 0 => array ( 'id' => '', 'mainphoto' => '', 'tab' => 'zakladne-udaje', 'photos' => '', 'year_launch' => '2000', 'year_completition' => '2000', 'authors' => '', 'collaborators' => '', 'buildup_area' => '123', 'costs' => '0', 'videos' => '', 'web' => '', 'order' => '123', 'show' => 'false', 'show_on_main_page' => 'false', 'show_on_teasers' => 'false', 'location_gm_lng' => '', 'location_gm_lat' => '', 'location_gm_zoom' => '', 'streetview_lat' => '', 'streetview_lng' => '', 'streetview_heading' => '', 'streetview_pitch' => '', 'streetview_zoom' => '', 'streetview_show' => '', 'language' => array ( 1 => array ( 'name' => 'aaa', 'description' => 'aaaa', 'client' => '', 'city' => '', 'location' => '', 'published' => '', 'exhibitions' => '', 'awards' => '', 'note' => '', ), 2 => array ( 'name' => 'bbb', 'description' => 'bbbb', 'client' => '', 'city' => '', 'location' => '', 'published' => '', 'exhibitions' => '', 'awards' => '', 'note' => '', ), ), ), ), )
744 }745 }746747 if (\Onion\Utils\Validators::isEmpty($element['value']) === true748 AND $required === false749 AND $ruleName !== 'callback') {750751 $element['error'] = null;752 $validElement = true;753 }754755 if ($validElement === false) {756 $valid = false;757 }758 }759760 $this->isValid = $valid;761762 if ($this->isSubmitted() === true) {763 $this->onSubmit();764 }765766 return $valid;767 }768769 /**770 * Metóda na overenie hodnoty položky pomocou vlastnej funkcie771 *772 * @param array metóda na overenie773 * @param mixed hodnota na overenie
array ( )
512 if (count($keys) === 1) {513 $values[$element['name']] = $element['value'];514515 } else {516 $v = &$values;517 foreach ($keys as $key) {518 $v = &$v[$key];519 }520521 $v = $element['value'];522 }523 }524525 unset($values['token']);526 return $values;527 }528529 public function open($echo = true)530 {531 $this->validate();532533 $anchor = '';534 if ($this->anchor !== null) {535 $anchor = '#'.$this->anchor;536 }537538 $out = '<form action="'.$this->action.$anchor.'" method="'.$this->method.'"';539540 if (empty($this->class) === false) {541 $class = implode(' ', (array) $this->class);
array ( )
932 $js .= '},'."\n";933 }934935 $js = trim($js, ",\n")."\n";936 $js .= '],'."\n";937 }938939 $js = trim($js, ",\n");940 $js .= '}'."\n";941 $js .= '});'."\n";942 $js .= '});'."\n";943944 return $js;945 }946947 public function getArrayCopy()948 {949 $array = array();950951 $array['open'] = $this->open(false);952 $array['close'] = $this->close(false);953 $array['buttons'] = $this->buttons;954955 $elements = array();956 $fieldsets = array();957 $hidden = array();958959 foreach ($this->elements as $element) {960 $attributes = array();961 if (isset($element['attributes']) === true) {
array ( 0 => 'false', )
336 'on_click' => array($this, 'save'),337 'class' => $saveClass338 ));339340 $form->addButton(array(341 'name' => 'save_close',342 'value' => 'Uložiť a koniec',343 'type' => 'submit',344 'on_click' => array($this, 'saveClose')345 ));346347 $form->addButton(array(348 'name' => 'close',349 'value' => 'Koniec',350 'type' => 'submit',351 'on_click' => array($this, 'close', false)352 ));353354 $this->view['title'] = 'Projekt :: ' . $projectModel['name'];355 $this->view['form'] = $form->getArrayCopy();356 $this->view['project'] = $projectModel;357 $this->services->onionCMS->assets->js($this->view['form']['js']);358359 if ($this->app->request->isAjax() === false) {360 foreach ($this->view['form']['errors'] as $error) {361 $this->app->addFlash($error, 'error', 'current');362 }363364 return;365 }
array ( )
31 $grid->addColumn('projects.show as show', 'Zobrazovať', array('select', $show), array($this->services->filters, 'bool'));32 $grid->addColumn('projects.order', 'Poradie');3334 $grid->addAction('<i class="icon icon-pencil"></i>', 'adminEditProject', 'Upraviť');35 $grid->addAction('<i class="icon icon-trash"></i>', 'adminDeleteProject', 'Zmazať');3637 $grid->addMultiaction('<i class="icon icon-trash"></i> Zmazať', array($this, 'deleteMulti'), 'confirm');3839 $this->view['title'] = 'Projekty';40 $this->view['grid'] = $grid->getArrayCopy();4142 $this->view['new_item_text'] = 'Pridať projekt';43 $url = $this->app->router->createUrl('adminCreateProject');44 $this->view['new_item_url'] = $url;45 }464748 public function create()49 {50 $this->edit(null);51 }525354 public function edit($projectId)55 {56 $this->view->setTemplate(ONIONCMS_DIR.'/Modules/Projects/Templates/EditProject.html');5758 $where = array();59 if ($projectId !== null) {60 $where[] = array('projects_contents.language', $this->services->onionCMS->language['id']);
array ( 0 => 0, )
151152 if ($this->actionName === null) {153 $this->actionName = $this->currentRoute->action;154 }155 preg_match('/([A-Za-z0-9]+)Controller/', $this->controllerName, $match);156 if (isset($match[1]) === true) {157 $view->setTemplate(APP_DIR.'/Templates/'.$match[1].'.html');158 }159160 $this->controller = new $this->controllerName($this->container);161162 $parameters = $this->currentRoute->getResource();163164 $this->runHooks('system.hooks.afterCreateController');165166 call_user_func_array(array($this->controller, 'before'), $parameters);167168 $this->runHooks('system.hooks.beforeControllerRun');169170 call_user_func_array(array($this->controller, $this->actionName), $parameters);171172 $this->runHooks('system.hooks.afterControllerRun');173174 call_user_func_array(array($this->controller, 'after'), $parameters);175176 if (is_object($this->controller->view) === true) {177 $view['flash'] = $this->flash['current'];178179 $this->runHooks('system.hooks.beforeRenderView');180
array ( 0 => array ( 0 => 'object (onionCMS\\Modules\\Projects\\Controllers\\AdminProjectsController)', 1 => 'create', ), 1 => array ( ), )
132 WWW_DIR.'/js/vendor/cookie.js',133 WWW_DIR.'/js/vendor/scroll-top.js',134 ),135 'less' => array(136 )137 ),138 'after' => array(139 'js' => array(140 WWW_DIR.'/js/main.js',141 ),142 'less' => array(143 WWW_DIR.'/less/main.less'144 )145 )146 )147 );148149 $app = new \Onion\Application($configuration);150151 $app->run();152 exit;
array ( )
13 // absolute filesystem path to the libraries14 define('LIBS_DIR', realpath(WWW_DIR.'/../vendor'));1516 // absolute filesystem path to the web root17 define('ONION_DIR', LIBS_DIR.'/Onion');1819 // absolute filesystem path to the application root20 define('APP_DIR', WWW_DIR.'/../app');2122 // absolute filesystem path to the temporary files23 define('TEMP_DIR', realpath(WWW_DIR.'/../temp'));2425 // absolute filesystem path to the cache26 define('CACHE_DIR', realpath(WWW_DIR.'/../cache'));2728 define('ONIONCMS_DIR', realpath(ONION_DIR.'/../onionCMS'));2930 // load bootstrap file31 if ($_SERVER["SERVER_ADDR"] === "127.0.0.1") {32 require ONIONCMS_DIR.'/bootstrap.dev.php';33 } else {34 require ONIONCMS_DIR.'/bootstrap.php';35 }
array ( 0 => '/mnt/devel/Atrium/atriumstudio/vendor/onionCMS/bootstrap.dev.php', )
array ( 'REDIRECT_STATUS' => '200', 'HTTP_HOST' => 'www.atriumarchitekti.loc', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0', 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'HTTP_ACCEPT_LANGUAGE' => 'sk,cs;q=0.8,en-US;q=0.5,en;q=0.3', 'HTTP_ACCEPT_ENCODING' => 'gzip, deflate', 'HTTP_REFERER' => 'http://www.atriumarchitekti.loc/admin/project/create', 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', 'CONTENT_LENGTH' => '1255', 'HTTP_ORIGIN' => 'http://www.atriumarchitekti.loc', 'HTTP_CONNECTION' => 'keep-alive', 'HTTP_COOKIE' => 'qazfdrtygdfxsw=jbahh4rnolvrtjqqsrocge1rss; language=sk; ws56trt87dfgxzaq=MzQyZWRMcGFsY2Q1Z3VRV0dqQmx0MklVV2FUeFlCTThGNGdDQSt5QjNsOFN6ZjUzWktOMVhaMHFQNHlEWVhqU0cydmkvRGYxZUtJUGV5bVJaT2hZc1k4cVJESVJBaTlxY2VOM0xFMy9JSmR5bUJJc1VRS0pJVkNVM3d2TWdwdVB6SkVqaW5XYzRhNm5IWkQ3Z0N6aFl2STdra2ltWWJFeHFNcWE3cHRxZjFkTXZldDFJYmJjZXovR3RETVN6OWs4M0xRR1pUTHlodUdDYTlZQnQvQTJhd3pjNnduZ1MvY1lZMHpmQnlWMnpoaWhEMGJ3STRmVTNTZXR0WFY1M1BlZXZ4eDQrcjdVcGlVPTNmMWRkZWUx', 'HTTP_UPGRADE_INSECURE_REQUESTS' => '1', 'HTTP_PRIORITY' => 'u=1', 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'SERVER_SIGNATURE' => '<address>Apache/2.4.38 (Debian) Server at www.atriumarchitekti.loc Port 80</address> ', 'SERVER_SOFTWARE' => 'Apache/2.4.38 (Debian)', 'SERVER_NAME' => 'www.atriumarchitekti.loc', 'SERVER_ADDR' => '127.0.0.1', 'SERVER_PORT' => '80', 'REMOTE_ADDR' => '127.0.0.1', 'DOCUMENT_ROOT' => '/mnt/devel/Atrium/atriumstudio/www_root', 'REQUEST_SCHEME' => 'http', 'CONTEXT_PREFIX' => '', 'CONTEXT_DOCUMENT_ROOT' => '/mnt/devel/Atrium/atriumstudio/www_root', 'SERVER_ADMIN' => 'webmaster@localhost', 'SCRIPT_FILENAME' => '/mnt/devel/Atrium/atriumstudio/www_root/index.php', 'REMOTE_PORT' => '53734', 'REDIRECT_URL' => '/admin/project/create', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'POST', 'QUERY_STRING' => '', 'REQUEST_URI' => '/admin/project/create', 'SCRIPT_NAME' => '/index.php', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1720039312.824, 'REQUEST_TIME' => 1720039312, )
array ( 'year_launch' => '2000', 'year_completition' => '2000', 'authors' => '', 'collaborators' => '', 'buildup_area' => '123', 'costs' => '0', 'videos' => '', 'web' => '', 'order' => '123', 'language' => array ( 1 => array ( 'name' => 'aaa', 'description' => 'aaaa', 'client' => '', 'city' => '', 'location' => '', 'published' => '', 'exhibitions' => '', 'awards' => '', 'note' => '', ), 2 => array ( 'name' => 'bbb', 'description' => 'bbbb', 'client' => '', 'city' => '', 'location' => '', 'published' => '', 'exhibitions' => '', 'awards' => '', 'note' => '', ), ), 'categories' => array ( 1 => array ( 'order' => '', ), 2 => array ( 'order' => '', ), 11 => array ( 'order' => '', ), 4 => array ( 'order' => '', ), 10 => array ( 'order' => '', ), 9 => array ( 'order' => '', ), 6 => array ( 'order' => '', ), 15 => array ( 'order' => '', ), 14 => array ( 'order' => '', ), 12 => array ( 'order' => '', ), 13 => array ( 'order' => '', ), ), 'gmaddress' => '', 'token' => '1f786c003a417c094746bbe8a892a219', 'id' => '', 'mainphoto' => '', 'tab' => 'zakladne-udaje', 'photos' => '', 'location_gm_lng' => '', 'location_gm_lat' => '', 'location_gm_zoom' => '', 'streetview_lat' => '', 'streetview_lng' => '', 'streetview_heading' => '', 'streetview_pitch' => '', 'streetview_zoom' => '', 'streetview_show' => '', 'save' => '', )
array ( )