Hello
I 'm trying to convert a drupal 5 theme into drupal 6 theme using this tutorial
"http://wtanaka.com/drupal/convert-theme-6"
but I end up having a " recoverable fatal error"

* recoverable fatal error: Object of class stdClass could not be converted to string in /var/www/html/drupal-6.6/sites/all/themes/mytheme/page.tpl.php on line 1.
* recoverable fatal error: Object of class stdClass could not be converted to string in /var/www/html/drupal-6.6/sites/all/themes/mytheme/page.tpl.php on line 1.

how I fix it ?

thanks

Comments

dkeays’s picture

I am having the same issue and seems to be choking at the "" tag when I edit a node with admin.

yuriy.babenko’s picture

Posting your code would go a long ways towards someone helping you :).
---
Yuriy Babenko
www.yubastudios.com
My Drupal tutorials: http://yubastudios.com/blog/tag/tutorials

---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com

dkeays’s picture

True.

But since I was just doing some preliminary R&D, I didn't even look at the code. It didn't help that I'm not hip on PHP's OO. The mention of a class which my code didn't explicitly refer to got me going in all sorts of wrong directions.

After playing with the common.inc and Drupal error handling I finally figured out it was PHP error caused by my misuse of an object. The $language object was derived from $stdCLASS.

In a custom theme I was using the line:

<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language ?>" xml:lang="<?php print $language ?>">

The line should have been:

<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->dir ?>">

Reading the node on migrating D5 themes to D6 more carefully would have helped, especially http://drupal.org/node/132442#language-var.