The main theme is usually disabled when a style is used. This prevents the theme from actually loading.

This patch adds a special loading for the theme.

CommentFileSizeAuthor
#6 list_themes_1.patch1.39 KBdrumm
#2 list_themes_0.patch1.49 KBdrumm
theme.inc_4.diff664 bytesdrumm

Comments

dries’s picture

Status: Needs review » Needs work

The problem can be reproduces as follows:

drumm Dries_: turn on only one style
drumm Dries_: and see the css work but not the html
drumm Dries_: ah, chamelion of course is a good testing theme
drumm Dries_: enable marvin, but no chamelion
Dries_ drumm, i enabled marvin, but not chameleon and everything works fine
drumm Dries_: get off the themes page
drumm Dries_: everything gets loaded on that one
Dries_ drumm, ok, i can reproduce it now

This patch works around a problem with theme settings not being saved correctly. It fixes the symptom, not the problem. Furthermore, it potentially adds a database query to every page load, making it an expensive solution. I'd like to see this investigated some more.

drumm’s picture

StatusFileSize
new1.49 KB

Here is an alternative patch which partially revents http://drupal.org/node/29002 and loads information on all the themes.

drumm’s picture

Status: Needs work » Needs review
dries’s picture

Status: Needs review » Needs work

Code looks forced to me: you force yourself to use a function, theme_list(), that doesn't do what you want it to do. What is wrong with doing a query in system_user() and getting the results in the conventional way?

drumm’s picture

The theme data has already been loaded from the database, so it doesn't make much sense to query for the same thing again. This isn't executed much at all so there really isn't a speed issue either way. I'm mostly just going with how the code was before.

drumm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.39 KB

Here is basically the same patch, but with less code.

dries’s picture

Status: Needs review » Fixed

Committed. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)