Настройки Adaptive Theme

Главные вкладки

Аватар пользователя alexo alexo 29 мая 2014 в 16:08

Здравствуйте!
Делаю дизайн на Adaptive theme. Для внесения изменений использую свою подтему myat (от my Adaptive theme), все вроде делаю по инструкции, в нужных файлах вставлено название myat. При перезагрузке моего компьютера тема слетает: мои настройки не отображаются (т.е. отображается голая тема adaptive theme)и выдаются ошибки:

Undefined index: myat в функции drupal_theme_initialize() (строка 100 в файле ... theme.inc).
Trying to get property of non-object в функции _drupal_theme_initialize() (строка 146 в файле ... theme.inc).
Trying to get property of non-object в функции _theme_load_registry() (строка 335 в файле ... theme.inc).
Trying to get property of non-object в функции _theme_load_registry() (строка 319 в файле /...theme.inc).
Undefined index: myat в функции theme_get_setting() (строка 1431 в файле ... theme.inc)

Проблема решается тем, что в админке друпала я захожу в оформление (/admin/appearance) и для темы myat выбираю "Включить и установить по умолчанию"
После этого восстанавливается и внешний вид с моими настройками из моего css файла
Где, что не так?
Возможно в настройках самого дурпала нужно поменять?
Почему она слетает?

Комментарии

Аватар пользователя alexo alexo 24 февраля 2015 в 21:59

Здравствуйте! Проблема та же до сих пор.
Добавляю описание ошибок и содержание строк, возможно, появятся предложения, как можно это исправить:
1) Undefined index: myat в функции drupal_theme_initialize() (строка 100

из этого файла:
строка 100: _drupal_theme_initialize($themes[$theme], array_reverse($base_theme));

текст от 93 до 100 строк:
// Find all our ancestor themes and put them in an array.
$base_theme = array();
$ancestor = $theme;
while ($ancestor && isset($themes[$ancestor]->base_theme)) {
$ancestor = $themes[$ancestor]->base_theme;
$base_theme[] = $themes[$ancestor];
}
_drupal_theme_initialize($themes[$theme], array_reverse($base_theme));

2)Notice: Trying to get property of non-object в функции _drupal_theme_initialize() (строка 146

$theme_path = dirname($theme->filename);

Т.е. у меня возможно неправильное название директории?
Может это потому что моя подтема лежит в папке custom (sites/all/themes/custom/myat)?

3)Notice: Trying to get property of non-object в функции _theme_load_registry() (строка 335

return new ThemeRegistry('theme_registry:runtime:' . $theme->name, 'cache');

более полное содержание от 299 до 335 строки:
/**
* Gets the theme_registry cache; if it doesn't exist, builds it.
*
* @param $theme
* The loaded $theme object as returned by list_themes().
* @param $base_theme
* An array of loaded $theme objects representing the ancestor themes in
* oldest first order.
* @param $theme_engine
* The name of the theme engine.
* @param $complete
* Whether to load the complete theme registry or an instance of the
* ThemeRegistry class.
*
* @return
* The theme registry array, or an instance of the ThemeRegistry class.
*/
function _theme_load_registry($theme, $base_theme = NULL, $theme_engine = NULL, $complete = TRUE) {
if ($complete) {
// Check the theme registry cache; if it exists, use it.
$cached = cache_get("theme_registry:$theme->name");
if (isset($cached->data)) {
$registry = $cached->data;
}
else {
// If not, build one and cache it.
$registry = _theme_build_registry($theme, $base_theme, $theme_engine);
// Only persist this registry if all modules are loaded. This assures a
// complete set of theme hooks.
if (module_load_all(NULL)) {
_theme_save_registry($theme, $registry);
}
}
return $registry;
}
else {
return new ThemeRegistry('theme_registry:runtime:' . $theme->name, 'cache');
}
}

Т.е. мне нужно было создать отдельно кэш "для темы"?
Как это сделать?

И что значит theme registry?

4)Notice: Undefined index: myat в функции theme_get_setting() (строка 1431
$theme_object = $themes[$theme];

более полное содержание от 1427 до 1447 строки:
// Get the values for the theme-specific settings from the .info files of
// the theme and all its base themes.
if ($theme) {
$themes = list_themes();
$theme_object = $themes[$theme];

// Create a list which includes the current theme and all its base themes.
if (isset($theme_object->base_themes)) {
$theme_keys = array_keys($theme_object->base_themes);
$theme_keys[] = $theme;
}
else {
$theme_keys = array($theme);
}
foreach ($theme_keys as $theme_key) {
if (!empty($themes[$theme_key]->info['settings'])) {
$cache[$theme] = array_merge($cache[$theme], $themes[$theme_key]->info['settings']);
}
}
}