My database keeps saying it's out of date. When I try to update it I get the following error:

Fatal error: Call to undefined function: phptemplate_get_ie_styles() in /home/kilro2/public_html/aifunction/main/themes/garland/maintenance-page.tpl.php on line 23

I dont understand why It is pulling the garland theme I am using a different one so I am sure that may be a problem. I am also recieving the error below on my home page which may be related:

* user warning: Unknown column 'img_titles' in 'field list' query: SELECT img_css, img_valign, img_titles FROM img WHERE nid = 1 in /home/kilro2/public_html/aifunction/main/modules/img_filter/img.module on line 857.
* user warning: Unknown column 'img_titles' in 'field list' query: SELECT img_css, img_valign, img_titles FROM img WHERE nid = 3 in /home/kilro2/public_html/aifunction/main/modules/img_filter/img.module on line 857.

I deleted the img_filter module hoping this would help but no luck. Any help would be awesome! Thank You!

Comments

bighank99’s picture

I get the same error for all of my images.
I am a newbie who started with Drupal 6.1.

I then tried the upgrade to v 6.2. Tried to do everything by the book as in disabling all extra modules etc.

The upgrade went fine.

Then drupal warned me that a couple of the modules were out of date (img_filter, lightbox2, taxonews, and tinymce). I downloaded the latest versions of these and untarred. Note that I am using a multiple site installation of drupal where each site uses some symlinks back to the various drupal folders (very confusing).

Anyway, now I get the 'Unknown column 'img_titles'' error, even when creating a new story with an attached image.

Can someone point both of us in the right direction?

bighank99’s picture

I solved the image query column problem by opening up the permissions on the image files folder again.

chmod -R 777 sites/files

Not sure if this had been reset back to default settings when the drupal 6.2 source was copied in.

Chris Charlton’s picture

I noticed when I put Minelli back into the Garland folder then the error went away.

I also noticed I can't install Drupal without Minelli, which is a shame really.

Chris Charlton
Manager
LA Drupal
Drupal Author
Published since 2007
marcp’s picture

I just had this same problem on a Drupal 6.5 site where I had removed Minelli from the Garland folder.

After putting Minelli back, the update was able to proceed.

monstordh’s picture

Worked for me as well, as I had removed Minelli. After putting it back, this problem disappeared.

conorc’s picture

worked again for me too after restoring Minnelli
thanks

arvana’s picture

Thanks for the Missing Minelli Tip!

ais.cat’s picture

thanks simple and useful

uh! in a multisite!

perfect ;-)

Jenechka’s picture

Thank you Chris very very much!!!

cwoodruf’s picture

Fatal error: Call to undefined function: phptemplate_get_ie_styles() in /home/kilro2/public_html/aifunction/main/themes/garland/maintenance-page.tpl.php on line 23

I was able to fix this problem by adding:

require_once("template.php");

in the

  2 // $Id: maintenance-page.tpl.php,v 1.3 2008/01/24 09:42:53 goba Exp $
  3
  4 /**
  5  * @file maintenance-page.tpl.php
  6  *
  7  * This is an override of the default maintenance page. Used for Garland and
  8  * Minnelli, this file should not be moved or modified since the installation
  9  * and update pages depend on this file.
 10  *
 11  * This mirrors closely page.tpl.php for Garland in order to share the same
 12  * styles.
 13  */
 14  require_once("template.php");
 15 

block at the head of the

themes/garland/maintenance-page.tpl.php

template.

wwwoliondorcom’s picture

hi,

I had the same problem on a druapl 6 multi install and it seems to work by adding as you said:

require_once("template.php");

Thanks a lot, and thank you if you can explain this bug.

wwwoliondorcom’s picture

It's a multi install a different theme for each site but

I also need to move the website theme from

sites/MYWEBSITE.com/themes/

to

main THEMES folder of the install

to be able to update, as it doesn't work with the theme in the website specific theme folder (drupal seems to be looking for the MAINTENANCE file in the main themes folder).

csc4’s picture

I've only just hit this problem on a 6 site which has been updating fine up until now.

I think there's a problem with sites with admin themes where Drupal is being confused into using the base theme directory rather than sites/all/themes as another poster said, but also with the two themes being called as I'm now getting a conflict between garland and clean

Fatal error: Cannot redeclare phptemplate_preprocess_page() (previously declared in D:\mysite\sites\all\themes\clean\template.php:38) in D:\mysite\themes\garland\template.php on line 62

I think it might be connected with the core upgrade from 6.9 to 6.12?

drupalmind’s picture

DOne the same code in maintainace.tpl.php but found another problem

Fatal error: require_once() [function.require]: Failed opening required 'template.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/test.org/htdocs/themes/garland/maintenance-page.tpl.php on line 14

Any one have some suggestions?

glass.dimly’s picture

I managed to fix this error by utilizing the include from above. Next, I had a conflict with Marinelli, my theme, which told me that a phptemplate_breadcrumb was already declared in Marinelli's template.php.

I did a search and replace in Marinelli's template.php for "phptemplate" and inserted "marinelli". 2 instances, well and good.

I was able to limp through the update in the theme Marinelli (??!?), but when I re-ran the update, Garland's maintenance mode was back, and the update proceeded normally in Garland.

Wierd. But fixed!

traceelements’s picture

I was having this issue, and the problem went away after I added Minnelli back into the Garland folder. No idea why, but it worked for me.

Jey.keu’s picture

I have nearly fixed the issue but all other pages need this change i figured, any better idea than adding the require_once line to each page???
plz Reply ASAP,
regards,
JQ

sobi3ch’s picture

yes minelli missing is problem, thanks for help

dailypress’s picture

WOW. I was about to get a heart attack. I couldnt login to example.com/user

it gave me the same error. I uploaded all CORE theme's and then it worked!

that was a close one!

gianfrasoft’s picture

I had the same problem, but the message was:

<!--[if lt IE 7]>
Fatal error: Call to undefined function phptemplate_get_ie_styles() in [...]/themes/garland/page.tpl.php on line 12

every time I went on the admin/build/block page.

The problem wasn't on the Garland template.php file BUT on the default template: the barlow's template.php file! Function phptemplate_get_ie_styles was missing from that file. Putting a copy of the phptemplate_get_ie_styles function, as it was in garland's template.php file, the problem disappeared.

Hope will help.

Web Software Engineer at
Insem S.p.A. - www.insem.it

browlands’s picture

This shows the beauty of threaded discussions on the drupal.org site. Had the same error, tapped in the error in the search box and voila, my problem solved.

Put the minelli theme back in, or update the garland theme and jobs a good 'un!

ryanhunt’s picture

I started having this same problem all of the sudden. The above tips kept giving me errors that the function was being re-declared.

So what I tried and eventually worked was.

Enabled the garland theme. Made it the default. Ran updates. Then made my other theme the default again.

thesettler’s picture

god, I wish there was this level of tech support for most software! how long have you guys been working in this field?

wimvanaelst’s picture

I got the problem after installing the following moodle modules. Also the administrative 'root candy' theme was gone.
Moodle 6.x-2.2-beta1
Moodle Course List 6.x-1.2

Disabling those moodle modules got me rid of the garland line 23 error, and the admin theme was back !

ais.cat’s picture

PROJECTE.CAT

Stephan_M’s picture

I too had a WSOD with update.php

Putting Minelli back into the Garland-Themefolder fixed it (even though i have a disabled Garland and am using Aquia_prosper).

There is something seriously wrong with the template engine of Drupal 6.15 or something.
THANKS A MILLION to whoever found that out above.

RSTaylor’s picture

This occurred to me as well, when updating a Pressflow installation from 6.16 to 6.19.

Minelli is present, as is phptemplate.engine

Prior to this update, update.php always used Minelli correctly.

Adding the template.php line to themes/garland/maintenance-page.tpl.php does cause the fatal error to go away, but update.php is now using the site's default (custom) theme instead of Minelli, with broken CSS (CSS Optimization is off).

Looked into it briefly and found that by the time _drupal_maintenance_theme() is called, the global $theme is already set, so it's skipping switching to the maintenance theme. I did not see where $theme was being set.

timaholt’s picture

I'm having this same issue with Pressflow 6.20. Does anyone have any further ideas?

penyaskito’s picture

Same when switching from drupal 6.24 to Pressflow 6.26

Christian López Espínola (@penyaskito)

robdubparker’s picture

Same for me... Pressflow 6.24 to 6.26

amorsent’s picture

I ran in to this as well. I think the issue is partially due to Pressflow's strict error and notice logging.

If a shoddy module causes PHP notices, the theme may be prematurely initialized in the process of logging the notice.

In my case, it was because of this #1186712: Use of undefined constant SCRIBESEO_LINK_UPGRADEACCOUNT / SCRIBESEO_LINK_GETKEY in scribeseo.module

The result that _drupal_log_error() gets called, and needs to theme the placeholders in the PHP notice message.

This causes init_theme() to fire early and lock in the wrong theme, and it all continues to tumble out of control.

A well placed print_r(debug_backtrace()); in init_theme() can help you identify what notice is causing the issue.

jefflane’s picture

This will also happen if you have the same theme in two different locations on a multi-site. The fix is to rename the current sites theme.

For instance, Framework theme on both your all/themes dir and your multi-site whatever.com/themes dir.

To fix this, rename Framework dir in your multi-site to be Framework-Something, the framework.info file to be framework-something.info and then edit the info file and change the name of the theme itself to FrameworkSomething.

Hope this hack helps!

Gold’s picture

Upgrading D6 Core from 6.20 to 6.22 has given me the same "Fatal error: Call to undefined function: phptemplate_get_ie_styles() in..." error except it's in themes/garland/maintenance-page.tpl.php on line 22.

The main suggestion of putting the minnelli theme back isn't going to work as it's already in place.

The suggestion of adding template.php to the beginning of the theme resulted in the following error;
Fatal error: Cannot redeclare phptemplate_breadcrumb() (previously declared in /path/to/drupal/sites/all/themes/framework/template.php:129) in /path/to/drupal/themes/garland/template.php on line 37

The stupid thing here is that phptemplate_breadcrumb() and phptemplate_get_ie_styles() are both declared in template.php and only template.php.

Continuing to explore this issue.

--
Regards
Gold
Drupal Code Monkey

Gold’s picture

Okay, this turned out to be our fault and not related to core themes at all.

The explanation, should anyone else find this issue in the future;

  1. We have a number of custom modules
  2. There were a number of define()'s in these modules
  3. A few were in more than one module (poor clean up when they moved.)
  4. This threw a php notice which triggered a drupal_set_message() which invoked the theme layer.
  5. The site theme was called (despite us being in update.php)
  6. The maintenance theme had already been initilised at this point so when our base theme loaded its template.php file we got the "cannot redeclare" message.

Hopefully this will help others. Also, debug_backtrace() is your friend.

--
Regards
Gold
Drupal Code Monkey