I just upgraded to 7.x-4.0-beta1. Now when I view a web form I see this error in my watchdog log when I view a webform as the logged-in site admin user. The error doesn't appear when I view the form as an anonymous user:

Warning: function_exists() expects parameter 1 to be string, array given in drupal_render() (line 5842 of /home/public_html/includes/common.inc).

By adding a little code to common.inc I can see the array value that's causing the problem:

... (Array, 1 element)
0 (String, 25 characters ) arrange_fields_pre_render | (Callback) arrange_fields_pre_render();

Now if I could get a trace of the call stack I'd have more info to share, but for some reason I can't get krumo to display anything when the error occurs. I tried to add a line of code to common.inc to display the stack when the array is detected:

dpm(debug_backtrace());

and I get a PHP out of memory error:

PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36561117 bytes)

So no luck with the back trace for now. I'm using PHP 5.3.10-1ubuntu3.8 and Drupal 7.23.

Comments

jurisolekss’s picture

I have the exact same problem. I have Drupal 7.21. Upgraded from Webform 3.19.

psdr2again’s picture

I have the exact same issue after installing the update. Drupal 7.23. Webform 7.x-4.0-beta1. I have the issue on 2 sites and messages only started after this release of Webform.

quicksketch’s picture

... (Array, 1 element)
0 (String, 25 characters ) arrange_fields_pre_render | (Callback) arrange_fields_pre_render();

Hm, well from the above error, it looks like this is related to the Arrange Fields module?

It sounds like that module might be adding a #pre_render attribute on an element incorrectly. If disabling that module makes the error go away, this issue should be transferred to that queue.

sah62’s picture

Project: Webform » Arrange Fields
Version: 7.x-4.0-beta1 » 7.x-1.12

Yes, that seems to be the case. When I temporarily disable arrange fields the problem goes away.

Moving to the Arrange Fields issue queue...

solquimpo’s picture

Status: Active » Needs review
StatusFileSize
new613 bytes

In function arrange_fields_add_draggable_wrappers, the element attributes should not be set if $element_type is empty. Attaching a patch.

richardp’s picture

@solquimpo,

Thanks, the patch looks good to me-- I will try to test it out and have it in the next version of AF.

Richard

sah62’s picture

Thanks! The patch seems to work for me, too.

summit’s picture

Status: Needs review » Reviewed & tested by the community

Hi,
Yes patch is good, please commit!
Greetings, Martijn

richardp’s picture

Version: 7.x-1.12 » 7.x-1.13
Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Should be fixed in the latest version (1.13)

Thanks all,
Richard

Status: Fixed » Closed (fixed)

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