I recently acquired access to a preconfigured Drupal website. I noticed some issues loading specific admin panels, so I ended up disabling the Adaptive Theme -AT Admin theme. I got a WSOD, and managed to reenable it, but now all my admin pages are returning this error:
Fatal error: Cannot redeclare adaptivetheme_admin_preprocess_page() (previously declared in /nas/webroot/mydomain.com/web/dev/themes/adaptivetheme/at_admin/template.php:6) in /nas/webroot/mydomain.com/web/dev/themes/adaptivetheme/at_admin/template.php on line 47
Here's the file it's talking about:
<?php
/**
* Override or insert variables into page templates.
*/
function adaptivetheme_admin_preprocess_page(&$vars) {
// RFC2822 date format
if ($rfc = date("r" , time())) {
$vars['datetime_rfc'] = t('@time', array('@time' => $rfc));
}
else {
$rfc = '';
$vars['datetime_rfc'] = '';
}
// ISO 8601 date format
if ($iso = gmdate('Y-m-d\TH:i:sO')) {
$vars['datetime_iso'] = $iso;
}
else {
$iso = '';
$vars['datetime_iso'] = '';
}
$vars['content_header_attributes_array']['class'][] = 'branding-elements';
$vars['content_header_attributes_array']['role'][] = 'banner';
}
/**
* Alter the search block form.
*/
function adaptivetheme_admin_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'search_block_form') {
$form['search_block_form']['#title'] = t('Search');
$form['search_block_form']['#title_display'] = 'invisible';
$form['search_block_form']['#size'] = 20;
$form['search_block_form']['#attributes']['placeholder'] = t('Search');
$form['actions']['submit']['#value'] = t('Go');
}
}
function adaptivetheme_admin_preprocess_page(&$vars) {
global $user;
$vars['datetime_rfc'] = '';
$vars['datetime_iso'] = '';
$vars['datetime_rfc'] = date("r" , time()); // RFC2822 date format
$vars['datetime_iso'] = date("c" , time()); // ISO 8601 date format
}
I'm pretty green on Drupal administration. I'd simply like to get the admin panel working again. I tried flushing all the caches, but get a different error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 280097 bytes) in /nas/webroot/mydomain.com/web/dev/includes/cache.inc on line 463
I found I can make quick changes if I login through SFTP and change the name of this particular sub-theme's folder. A bare-version of the admin shows up, but returns the same error after 15 seconds or so. This allowed me to at least re-enable the theme, but I'm unsure why it's still not loading.