Добрый день.
Обнаружилась такая вот ошибка: при переходе по ссылке "добавить объявление" в верхнем меню. Что это может быть?
Как это лечится?
Георгий писал(а):Добрый день.
Обнаружилась такая вот ошибка: при переходе по ссылке "добавить объявление" в верхнем меню. Что это может быть?
Как это лечится?
{baseUrl}/guestad/add
{baseUrl}/en/guestad/add
Xpycm писал(а):Дело не в ссылке - это точно.
Судя по тексту ошибки в foreach отдаётся не массив
Для отображения более полной информации об ошибке включите DEBUG-режим: http://open-real-estate.info/ru/faq#debug-mode
После этого скопируйте сюда полный текст ошибки.
PHP warning
Invalid argument supplied for foreach()
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/protected/views/common/apartments/backend/fields/references.php(12)
01 <?php if ($model->canShowInForm('references')) { ?>
02
03 <div class="apartment-description-item">
04 <?php
05
06 $prev = '';
07 $column1 = 0;
08 $column2 = 0;
09 $column3 = 0;
10
11 $count = 0;
12 foreach ($model->references as $catId => $category) {
13 if (isset($category['values']) && $category['values'] && isset($category['title'])) {
14
15 if ($prev != $category['style']) {
16 $column2 = 0;
17 $column3 = 0;
18 echo '<div class="clear"> </div>';
19 }
20 $$category['style']++;
21 $prev = $category['style'];
22 echo '<div class="' . $category['style'] . '">';
23 echo '<input type="checkbox" class="ref-check-all" title="'.CHtml::encode(tc('check all')).'"/>
24 <span class="viewapartment-subheader">'
Stack Trace
#0
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CBaseController.php(126): require("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...")
#1
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CBaseController.php(95): CBaseController->renderInternal("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...", array("model" => Apartment), true)
#2
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CController.php(870): CBaseController->renderFile("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...", array("model" => Apartment), true)
#3
–
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/protected/modules/formdesigner/models/HFormEditor.php(134): CController->renderPartial("//../views/common/apartments/backend/fields/references", array("model" => Apartment))
129 if (!$model->canShowInForm($row['field'])) {
130 continue;
131 }
132
133 if ($row['standard_type'] == FormDesigner::STANDARD_TYPE_ORIGINAL_VIEW) {
134 Yii::app()->controller->renderPartial('//../views/common/apartments/backend/fields/' . $row['field'], array('model' => $model));
135 continue;
136 }
137
138 $required = ($row->rules == '1' || $row->rules == '2') ? array('required' => true) : array();
139
#4
–
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/protected/modules/apartments/views/backend/__form_general.php(168): HFormEditor::renderFormRows(array(FormDesigner, FormDesigner, FormDesigner, FormDesigner, ...), Apartment)
163 'type' => 'text'
164 ));
165 }
166
167 $rows = HFormEditor::getGeneralFields();
168 HFormEditor::renderFormRows($rows, $model);
169
170 $canSet = $model->canSetPeriodActivity() ? 1 : 0;
171
172 echo '<div class="rowold" id="set_period" ' . ( !$canSet ? 'style="display: none;"' : '' ) . '>';
173 echo $form->labelEx($model, 'period_activity');
#5
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CBaseController.php(126): require("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...")
#6
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CBaseController.php(95): CBaseController->renderInternal("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...", array("model" => Apartment, "form" => CActiveForm), true)
#7
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CController.php(870): CBaseController->renderFile("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...", array("model" => Apartment, "form" => CActiveForm), true)
#8
–
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/themes/classic/views/modules/guestad/views/create.php(67): CController->renderPartial("//../modules/apartments/views/backend/__form_general", array("model" => Apartment, "form" => CActiveForm))
62
63 <?php
64 $this->renderPartial('//../modules/apartments/views/backend/__form_general', array(
65 'model' => $model,
66 'form' => $form,
67 ));
68
69 $tabs = array();
70 if (param('useUserRegistration')) {
71 $tabs['tab_register'] = array(
72 'title' => tc('Join now'),
#9
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CBaseController.php(126): require("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...")
#10
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CBaseController.php(95): CBaseController->renderInternal("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...", array("model" => Apartment, "user" => User, "login" => LoginForm, "activeTab" => "tab_register"), true)
#11
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CController.php(870): CBaseController->renderFile("/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--...", array("model" => Apartment, "user" => User, "login" => LoginForm, "activeTab" => "tab_register"), true)
#12
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CController.php(782): CController->renderPartial("create", array("model" => Apartment, "user" => User, "login" => LoginForm, "activeTab" => "tab_register"), true)
#13
–
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/protected/modules/guestad/controllers/MainController.php(132): CController->render("create", array("model" => Apartment, "user" => User, "login" => LoginForm, "activeTab" => "tab_register"))
127 $this->render('create', array(
128 'model' => $model,
129 'user' => $user,
130 'login' => $login,
131 'activeTab' => $activeTab,
132 ));
133 }
134 }
#14
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/actions/CInlineAction.php(49): MainController->actionCreate()
#15
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CController.php(308): CInlineAction->runWithParams(array())
#16
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)
#17
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/filters/CFilter.php(40): CFilterChain->run()
#18
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/filters/CFilterChain.php(130): CFilter->filter(CFilterChain)
#19
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/filters/CFilter.php(40): CFilterChain->run()
#20
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CController.php(1146): CFilter->filter(CFilterChain)
#21
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/filters/CInlineFilter.php(58): CController->filterAccessControl(CFilterChain)
#22
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter(CFilterChain)
#23
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CController.php(291): CFilterChain->run()
#24
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array("accessControl", array("ESetReturnUrlFilter + index, view, create, update, bookingform, ...")))
#25
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CWebApplication.php(282): CController->run("create")
#26
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/web/CWebApplication.php(141): CWebApplication->runController("guestad/main/create")
#27
+
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/framework/base/CApplication.php(180): CWebApplication->processRequest()
#28
–
/home/users/j/j288533/domains/xn----8sbafbnyeadlpqdpba9amgv.xn--p1ai/index.php(23): CApplication->run()
18
19 define('ALREADY_INSTALL_FILE', ROOT_PATH . DIRECTORY_SEPARATOR . 'protected' . DIRECTORY_SEPARATOR
20 . 'runtime' . DIRECTORY_SEPARATOR . 'already_install');
21
22 require_once($yii);
23 Yii::createWebApplication($config)->run();
2015-08-03 09:15:27 Apache Yii Framework/1.1.15
$model->period_activity = param('apartment_periodActivityDefault', 'always');
$model->references = $model->getFullInformation($model->id, $model->type);
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 8