allows fatal strings

amanda - February 27, 2007 - 07:17
Project:Content Templates (Contemplate)
Version:4.7.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

I was trying to sort out how to call a list of taxonomy terms in a teaser template and tried
[code]

<?php
foreach ((array)$taxonomy as $item) {
?>

<?php
print $item['view']
?>

<?php
}
?>

[/code]

which doesn't work, okay, I can work with that. But it really, really doesn't work. I can't even edit my templates now, it so doesn't work. i get this instead, when I view or edit templates:

Fatal error: Cannot use object of type stdClass as array in /home/members/.../web/sites/default/modules/contemplate/contemplate.module(455) : eval()'d code on line 10

I can't even fix the code, I'm totally locked out.

#1

amanda - February 27, 2007 - 07:30

In case anyone is wondering, I was able to go into the database to remove the offending code and replace it with functional code:

<?php
foreach ((array)$taxonomy as $item) {
print
$item->name
}
?>

But I shouldn't have been forced to do that.

#2

inforeto - March 2, 2008 - 05:41
Status:active» duplicate

Duplicate of: http://drupal.org/node/113980
Issue of not having a way to reset the template.

Edit (March 1, 2008)
here's related:
http://drupal.org/node/101144
http://drupal.org/node/113980
http://drupal.org/node/123061
http://drupal.org/node/137719
http://drupal.org/node/220374

#3

jrglasgow - March 2, 2008 - 05:51

The ability to delete the template from /admin/content/templates is in 5.x-1.9 releasing tonight. I am not planning on porting to 4.7

 
 

Drupal is a registered trademark of Dries Buytaert.