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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2097223-fixed-wrong-pre-render-value.patch | 613 bytes | solquimpo |
Comments
Comment #1
jurisolekss commentedI have the exact same problem. I have Drupal 7.21. Upgraded from Webform 3.19.
Comment #2
psdr2again commentedI 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.
Comment #3
quicksketchHm, 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.
Comment #4
sah62 commentedYes, that seems to be the case. When I temporarily disable arrange fields the problem goes away.
Moving to the Arrange Fields issue queue...
Comment #5
solquimpo commentedIn function arrange_fields_add_draggable_wrappers, the element attributes should not be set if $element_type is empty. Attaching a patch.
Comment #6
richardp commented@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
Comment #7
sah62 commentedThanks! The patch seems to work for me, too.
Comment #8
summit commentedHi,
Yes patch is good, please commit!
Greetings, Martijn
Comment #9
richardp commentedShould be fixed in the latest version (1.13)
Thanks all,
Richard