Symptoms include the following warnings on the themes page

warning: call_user_func(phptemplate_templates): First argument is expected to be a valid callback in /srv/www/drupal-4.7.4/themes/engines/theme_editor/theme_editor_engine.engine on line 38.
warning: Invalid argument supplied for foreach() in /srv/www/drupal-4.7.4/themes/engines/theme_editor/theme_editor_engine.engine on line 38.

and customized theme is not listed.

Problem occurs because phptemplate.engine engine has not been loaded when call_user_func(phptemplate_templates) is attempted in theme_editor_engine.engine on line 38.

Proposed patch is

37a38
> 			if (!function_exists($engine->name .'_templates')) drupal_load('theme_engine', $engine->name);
CommentFileSizeAuthor
theme_editor_engine.engine.patch.txt106 bytesemaxware

Comments

Anonymous’s picture

I'm going to jump in and say that this fix seems to have solved a problem that I was having on two different web sites. I'm not too knowledgeable about using patches. I inserted the suggested fix before line 38, followed by a {. I also added the closing } after the three (I think it was three) lines that follow.

Surprisingly, I did not experience this problem on two other Drupal sites. If someone could ever explain that, I'm sure that there are quite a few of us who would appreciate the answer.

Happy day,
Anne

noid’s picture

Just add the patch after the following code:

foreach ($engines as $engine) {

and before

if ($engine->name != 'theme_editor_engine') {

Worked for me. Thanks!

puregin’s picture

Status: Active » Reviewed & tested by the community

Updating the status to RTBC - one line patch, obvious solution, tested and works for me.

Thanks

arcaneadam’s picture

Status: Reviewed & tested by the community » Closed (fixed)