The admin theme can not be managed on page admin/build/themes/settings, if it is disabled.

the issue is related to http://drupal.org/node/19277
Keeping theme and block setting page consistent

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pasqualle’s picture

Status: Active » Needs review
TapocoL’s picture

Status: Needs review » Needs work

One suggestion I have is. To maintain consistency, you should also modify the 'list of themes' page to allow that page to configure the admin theme, as well. Go to 'admin/build/themes' to see the where the configure link needs to be.

Pasqualle’s picture

Status: Needs work » Needs review
FileSize
2.1 KB

sorry, the previous link is wrong
the issue is related to http://drupal.org/node/192779 which is fixed now

added:
#2 configure link is displayed on page admin/build/themes for admin theme also

TapocoL’s picture

Status: Needs review » Needs work

The patch has a problem. On the list of themes, if you set your administration theme to a bluemarine (for example), and then disable it, it will still remain checked on the page as enabled. However, it is getting saved in the database as disabled. So, the problem is the page is just displaying it as enabled when in fact it is DISabled. I have not been able to work with CVS/Patches well, but this is the fix for it:

Don't make any changes to the if in the system.admin.inc

    if (!empty($theme->status)) {
      $status[] = $theme->name;
      $form[$theme->name]['operations'] = array('#value' => l(t('configure'), 'admin/build/themes/settings/'. $theme->name) );
    }

Change the else attached to the if right after that to

    else {
      if ($theme->name == variable_get('admin_theme', '0')) {
        // Can be configured because it is the Admin Theme
      $form[$theme->name]['operations'] = array('#value' => l(t('configure'), 'admin/build/themes/settings/'. $theme->name) );
      }
      else {
        // Dummy element for drupal_render. Cleaner than adding a check in the theme function.
        $form[$theme->name]['operations'] = array();
      }
      // Ensure this theme is compatible with this version of core.
      if (!isset($theme->info['core']) || $theme->info['core'] != DRUPAL_CORE_COMPATIBILITY) {
        $incompatible_core[] = $theme->name;
      }
      if (version_compare(phpversion(), $theme->info['php']) < 0) {
        $incompatible_php[$theme->name] = $theme->info['php'];
      }
    }

I changed this code and the enabled check mark is gone because it does not make a new status array for it. And, the configure link works. I went through some of the configures and couldn't see any problems. I will test again on the next patch that can be made. Wish, I could just make the patches myself. :(

Pasqualle’s picture

Status: Needs work » Needs review
FileSize
2.56 KB

You are right, I missed the status change, thanks for the review.
Fixed the problem, not exactly the way you asked, but similar. I think the code is shorter this way.

Patch creation is really easy. If you are using windows, and have specific questions about it, don't hesitate to contact me..

And thanks for your help again, we need more reviewers. The issue queue is too long..

TapocoL’s picture

Status: Needs review » Reviewed & tested by the community

I get the same results, as my statement. Could still navigate through theme config and save configs without problems. I think the patch is ready for commitment. However, change it back to review if you need more than just one reviewer.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

I fixed code style problems, and committed this, thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Gábor Hojtsy’s picture

Turns out special casing the admin theme was not a good idea at all: #542828: Do not special case disabled admin theme