I was trying to sort out how to call a list of taxonomy terms in a teaser template and tried
[code] foreach ((array)$taxonomy as $item) {
print $item['view']
}
[/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.

Comments

amanda’s picture

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

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

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

inforeto’s picture

Status: Active » Closed (duplicate)
jrglasgow’s picture

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