Hello, love the module, but when I try to a webform block to a panel, it gives me this error.

Notice: Undefined property: stdClass::$build_mode in webform_node_view() (line 1323 of /var/www/mydomain.com/pressflow-6.22.104/sites/mydomain.com/modules/webform/webform.module).
Notice: Undefined property: stdClass::$build_mode in webform_node_view() (line 1328 of /var/www/mydomain.com/pressflow-6.22.104/sites/mydomain.com/modules/webform/webform.module).
Notice: Undefined property: stdClass::$build_mode in webform_node_view() (line 1323 of /var/www/mydomain.com/pressflow-6.22.104/sites/mydomain.com/modules/webform/webform.module).
Notice: Undefined property: stdClass::$build_mode in webform_node_view() (line 1328 of /var/www/mydomain.com/pressflow-6.22.104/sites/mydomain.com/modules/webform/webform.module).

This error is shown while your editing your panel and when viewing the panel page.

I'm using the following setup:
Pressflow-6.22.104
Panels-6.x-3.x-dev
Ctools-6.x-1.x-dev
Webform-6.x-3.11

Let me know if you need any more information,
-Glenn

CommentFileSizeAuthor
#3 webform-notices-1206442-3.patch1.44 KBmoonray

Comments

quicksketch’s picture

Looks like this is likely caused by Panels module not setting $node->build_mode when it renders a node in a Panel pane. While I think Panels is at fault here more than Webform, we can fix this issue on the Webform side by checking to make sure $node->build_mode is set first.

Note that you're just getting PHP "Notices", which is PHP's way of saying, "Something *might* be wrong (but it's probably fine)". This won't negatively affect your site in any way, other than the errors. Most production servers do not have PHP notices configured to display.

gmclelland’s picture

Thanks quicksketch, this is good to hear.

moonray’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.44 KB

Attached patch fixes these notices.

quicksketch’s picture

Title: Notice: Undefined property: stdClass::$build_mode » Notice: Undefined property: stdClass::$build_mode when using Webform within a Panel
Status: Needs review » Fixed

Thanks guys, I don't get around to working on 6.x-3.x patches often. Committed to 6.x-3.x branch. This issue doesn't affect D7 versions.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.