Live comment fails in zen theme

liveoutloud2day - June 15, 2008 - 02:19
Project:Live
Version:5.x-0.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Using the live comment feature when using a zen theme 5.x-1.1, it fails with the following warning: Invalid argument supplied for foreach() in /modules/node/node.module on line 521. This error does not show up when using the Garland theme. To quote JohnAlbin in a recent IRC (where he correctly found the error was caused by the live module)

[21:08] liveoutloud2day: Are you using http://drupal.org/project/live ?
[21:09] It is in there - I will try disabling it.
[21:12] Yes, my guess is that "live comment preview" is trying to theme the comment outside of the context of a node page. And that module is not populating $vars['comment']->nid and other essential variables.
[21:21] That is indeed the problem - thanks so much!
[21:33] liveoutloud2day: Btw, I would recommend filing a bug with the live module. The Zen theme is quite popular. And there's no reason why the live module can't pass a complete comment object to the theme function.

Thanks!

#1

Gurpartap Singh - June 28, 2008 - 19:19
Status:active» postponed (maintainer needs more info)

I'm using port of version 5.x-dev no my blog at http://myzonelabs.com/ and it works pretty well, though not using any of the variables provided with zen theme's comment.

I won't be able to put much time in it as of now but will be happy to commit if you could prepare a patch for it. :) Or just provide a reference to where I'm populating those variables.

Thanks!!!

#2

scottrigby - August 19, 2008 - 16:07

This happens on the 6 version as well.

Here's what I get:

warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/kamp/modules/forum/forum.module on line 472.
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/kamp/modules/forum/forum.module on line 472.
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/kamp/modules/forum/forum.module on line 472.
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/kamp/modules/forum/forum.module on line 472.

This happens after saving a forum comment (using advanced_forum if that's relevant).
I'm using a zen sub-theme btw...

Cheers!
:) Scott

 
 

Drupal is a registered trademark of Dries Buytaert.