Hi,
I've upgraded from 2.6 to Vers. 3.1.
When I try to send an email I get the following Errors:

* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_date() in /www/htdocs/w0095e17/modules/webform/components/date.inc on line 306.
* warning: Missing argument 2 for _webform_display_date() in /www/htdocs/w0095e17/modules/webform/components/date.inc on line 306.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_email() in /www/htdocs/w0095e17/modules/webform/components/email.inc on line 173.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textarea() in /www/htdocs/w0095e17/modules/webform/components/textarea.inc on line 129.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_date() in /www/htdocs/w0095e17/modules/webform/components/date.inc on line 306.
* warning: Missing argument 2 for _webform_display_date() in /www/htdocs/w0095e17/modules/webform/components/date.inc on line 306.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.
* warning: Missing argument 2 for _webform_display_email() in /www/htdocs/w0095e17/modules/webform/components/email.inc on line 173.
* warning: Missing argument 2 for _webform_display_textfield() in /www/htdocs/w0095e17/modules/webform/components/textfield.inc on line 167.
* warning: Missing argument 2 for _webform_display_textarea() in /www/htdocs/w0095e17/modules/webform/components/textarea.inc on line 129.
* warning: Missing argument 2 for _webform_display_select() in /www/htdocs/w0095e17/modules/webform/components/select.inc on line 433.

The email I receive includes no data from the submission.

I uninstalled and reinstalled the module but still having this problem.

I use a webform-form-[nid].tpl.php

I can't solve this problem alone but need the form urgent.

Please help anybody.
Thanks

Comments

quicksketch’s picture

Try removing all of your custom Webform theming and then submitting the form. I don't think the form structure changed between 2.x and 3.x, so your webform-form-[nid].tpl.php file shouldn't have an effect, but you never know. More likely this problem would be caused by a themed webform-mail.tpl.php file.

tomberlin’s picture

I tried with template and without and it makes no difference.
It seems for me that it has problems to read the data.
When I view the submission I get this:

Apartment:
Array
Anzahl Personen /
number of persons:
Array
Anreise / arrival:
Array
....

My website: www.koffer-in-berlin.com.

Any idea?
Thanks

jonesmac’s picture

I receive the same errors.

Here's the log entry:

Missing argument 2 for _webform_display_textarea() in /home/neo3jon3/public_html/drupal/sites/all/modules/webform/components/textarea.inc on line 129.

jonesmac’s picture

Version: 6.x-3.1 » 6.x-3.2

I receive the same errors.

Here's the log entry:

Missing argument 2 for _webform_display_textarea() in /home/neo3jon3/public_html/drupal/sites/all/modules/webform/components/textarea.inc on line 129.

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)

I need more information in order to reproduce (and fix) this problem.

jonesmac’s picture

I have created a new webform and added one field (text area). When I submit the form, the following errors comeback. For some reason it doesn't seem to pass through the textarea.inc file. I am sure you need more, so let me know what questions you would like answered and I will try to help.

warning: Missing argument 2 for _webform_display_textarea() in /home/neo3jon3/public_html/drupal/sites/all/modules/webform/components/textarea.inc on line 129.
warning: Missing argument 2 for _webform_display_textarea() in /home/neo3jon3/public_html/drupal/sites/all/modules/webform/components/textarea.inc on line 129.

It also say "The requested page could not be found."

When I go to view the submission is says message: (the title of my field) and the only data it says came through that field is "array" Meaning its missing the arguement

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I haven't gotten any similar reports in several months now, I'm guessing this was solved in one of the updates since 3.2.

pepemty’s picture

Sorry to reopen this issue, Nathan.

I also have these warnings, after sending the form and when I open the results:

warning: Missing argument 2 for _webform_display_textfield() in /home/thebeerb/acideal.com/sites/all/modules/webform/components/textfield.inc on line 167.
warning: Missing argument 2 for _webform_display_textfield() in /home/thebeerb/acideal.com/sites/all/modules/webform/components/textfield.inc on line 167.
warning: Missing argument 2 for _webform_display_textfield() in /home/thebeerb/acideal.com/sites/all/modules/webform/components/textfield.inc on line 167.
warning: Missing argument 2 for _webform_display_email() in /home/thebeerb/acideal.com/sites/all/modules/webform/components/email.inc on line 174.
warning: Missing argument 2 for _webform_display_textfield() in /home/thebeerb/acideal.com/sites/all/modules/webform/components/textfield.inc on line 167.
warning: Missing argument 2 for _webform_display_textarea() in /home/thebeerb/acideal.com/sites/all/modules/webform/components/textarea.inc on line 131.

Plus, my posting only sends "Array":
Nombre:
Array
Compañía:
Array
Teléfono:
Array
Correo electrónico:
Array
Asunto:
Array
Mensaje:
Array

I'll appreciate any help here.

Warm regards from sunny México!
: )
Pepe

jonesmac’s picture

I still have the same issue as well with webform 3.5

cmartin3251’s picture

Version: 6.x-3.2 » 6.x-3.11
Status: Closed (fixed) » Active
StatusFileSize
new358.02 KB

This issue still persists. I am convinced it is a themeing issue, but am not sure what component of the theme is causing this issue. This issue is NOT fixed, and I would appreciate any insight to what the actual issue may be. I am looking for a SOLUTION because this happens inconsistently and not a workaround.

The errors I received are:

warning: Missing argument 2 for _webform_display_textfield() in /home8/cdllicen/public_html/sites/all/modules/webform/components/textfield.inc on line 167.
    warning: Missing argument 2 for _webform_display_select() in /home8/cdllicen/public_html/sites/all/modules/webform/components/select.inc on line 481.

my textfield.inc lines 160-180:


  return $element;
}

/**
 * Implements _webform_display_component().
 */
function _webform_display_textfield($component, $value, $format = 'html') {
  return array(
    '#title' => $component['name'],
    '#weight' => $component['weight'],
    '#theme' => 'webform_display_textfield',
    '#theme_wrappers' => $format == 'html' ? array('webform_element', 'webform_element_wrapper') : array('webform_element_text'),
    '#post_render' => array('webform_element_wrapper'),
    '#field_prefix' => $component['extra']['field_prefix'],
    '#field_suffix' => $component['extra']['field_suffix'],
    '#format' => $format,
    '#value' => isset($value[0]) ? $value[0] : '',
    '#webform_component' => $component,
  );
}

my select.inc lines 477-492


/**
 * Implements _webform_display_component().
 */
function _webform_display_select($component, $value, $format = 'html') {
  return array(
    '#title' => $component['name'],
    '#weight' => $component['weight'],
    '#theme' => 'webform_display_select',
    '#theme_wrappers' => $format == 'html' ? array('webform_element', 'webform_element_wrapper') : array('webform_element_text'),
    '#post_render' => array('webform_element_wrapper'),
    '#format' => $format,
    '#value' => (array) $value,
    '#webform_component' => $component,
  );
}

Any help in getting this issue resolved is greatly appreciated.

quicksketch’s picture

If you can provide any way to reproduce this issue from a new Drupal install I'd be happy to take a look at it. From the descriptions provided it looks like this is caused by either something in the site's theme or from an add-on to the Webform module.

cmartin3251’s picture

StatusFileSize
new9.16 KB

Well, I can tell you that I did not test the webforms, nor make the forms until the website was online. As far as replication goes, I made absolutely NO adjustments to the webforms in my theme (ad_novus) or the module itself. The only things I adjusted in the theme, were the style sheets (see attached). The website itself is currently viewable at http://www.cdllicense.com/

I will be glad to give you any information you need in working to resolve this issue.

quicksketch’s picture

The extra-mysterious thing about this problem is that those functions (the "display" functions) shouldn't be getting called at all. Those functions are intended to show the contents of a submission that have been completed (such as in the e-mail or when an admin is viewing the submission). Are you getting those errors just by viewing the node or is this after you submit the form?

cmartin3251’s picture

I am receiving these errors upon form submission. Additionally, the values that are displayed in the form submission email are displayed as ARRAY instead of the user inputted value:

Submitted on Friday, July 1, 2011 - 10:24
Submitted by user: DrupalTrucker
Submitted values are:

Last Name: Array
First Name: Array
Street Address: Array
City: Array
State: Array
Zip Code: Array
Home Phone: Array
Cell Phone: Array
Work Phone: Array
Email: Array
Name of School: Array
City of School: Array
State of School: Array
Date of Graduation: Array
Website You Used to Find School: Array


The results of this submission may be viewed at:
http://www.cdllicense.com/node/70/submission/1
cmartin3251’s picture

I deleted and reinstalled the Webform module completely (including downloading an entirely new copy of the module fresh from the project page) yet, still no resolution. Leaving me to believe that this is not a webform problem so much as it is a conflict with another module or theme. Please see below for the list of installed modules on this website for known conflict reporting.

Rotor Banner
6.x-2.8

Content
6.x-2.9

Content Copy
6.x-2.9

Content Permissions
6.x-2.9

Fieldgroup
6.x-2.9

FileField
6.x-3.10

FileField Meta
6.x-3.10

ImageField
6.x-3.10

Node Reference
6.x-2.9

Number
6.x-2.9

Option Widgets
6.x-2.9

Text
6.x-2.9

User Reference
6.x-2.9

Bulk Export
6.x-1.8

Chaos tools
6.x-1.8

Chaos Tools (CTools) AJAX Example
6.x-1.8

Chaos Tools (CTools) Plugin Example
6.x-1.8

Custom content panes
6.x-1.8

Custom rulesets
6.x-1.8

Page manager
6.x-1.8

Stylizer
6.x-1.8

Views content panes
6.x-1.8

Content Analysis API
6.x-1.6

Content Analysis API Example
6.x-1.6

Content Optimizer
6.x-2.2

Aggregator
6.22

Blog
6.22

Blog API
6.22

Book
6.22

Color
6.22

Comment
6.22

Contact
6.22

Content translation
6.22

Database logging
6.22

Forum
6.22

Help
6.22

Locale
6.22

Menu
6.22

OpenID
6.22

Path
6.22

PHP filter
6.22

Ping
6.22

Poll
6.22

Profile
6.22

Search
6.22

Statistics
6.22

Syslog
6.22

Taxonomy
6.22

Throttle
6.22

Tracker
6.22

Trigger
6.22

Update status
6.22

Upload
6.22

Devel
6.x-1.24

Devel generate
6.x-1.24

Devel node access
6.x-1.24

Path redirect generate
6.x-1.0-rc2

Performance Logging
6.x-1.24

Image
6.x-1.1

Image Attach
6.x-1.1

Image Gallery
6.x-1.1

Image Import
6.x-1.1

ImageMagick Advanced Options
6.x-1.1

GMap
6.x-1.1

GMap Location
6.x-1.1
 
GMap Macro Builder
6.x-1.1
 
GMap Taxonomy Markers
6.x-1.1

Embedded Audio Field
6.x-2.5

Embedded Image Field
6.x-2.5

Embedded Inline Media
6.x-2.5

Embedded Media Bonus Pack
6.x-2.5

Embedded Media Field
6.x-2.5

Embedded Media Thumbnail
6.x-2.5

Embedded Video Field
6.x-2.5

Embedded Wave Field
6.x-2.5

Nodewords
6.x-1.11

Nodewords - basic meta tags
6.x-1.11

Nodewords - extra meta tags
6.x-1.11

Nodewords - site verification meta tags
6.x-1.11

Block translation
6.x-1.9

CCK translation
6.x-1.9

Content type translation
6.x-1.9

Internationalization
6.x-1.9

Menu translation
6.x-1.9

Poll aggregate
6.x-1.9

Profile translation
6.x-1.9

String translation
6.x-1.9

Synchronize translations
6.x-1.9

Taxonomy translation
6.x-1.9

OpenLayers
6.x-2.0-beta1

OpenLayers CCK
6.x-2.0-beta1

OpenLayers Filters
6.x-2.0-beta1

OpenLayers Test Features
6.x-2.0-beta1

OpenLayers Tests
6.x-2.0-beta1

OpenLayers UI
6.x-2.0-beta1

OpenLayers Views
6.x-2.0-beta1

Advanced help
6.x-1.2

Advanced help example
6.x-1.2

CKEditor
6.x-1.3

getID3()
6.x-1.4

Global Redirect
6.x-1.2

IMCE
6.x-2.2

MapBox
6.x-1.0-alpha3

Nice Menus
6.x-2.1

Page Title
6.x-2.3

Path redirect
6.x-1.0-rc2

Pathauto
6.x-1.5

Search 404
6.x-1.10

Sections
6.x-1.4

Site Verification
6.x-1.0

Token
6.x-1.16

Token actions
6.x-1.16

TokenSTARTER
6.x-1.16

Upload elements
6.x-1.2

Mini panels
6.x-3.9

Panel nodes
6.x-3.9

Panels
6.x-3.9

Panels In-Place Editor
6.x-3.9

CAPTCHA
6.x-2.4

Image CAPTCHA
6.x-2.4

reCAPTCHA
6.x-1.7

reCAPTCHA Mailhide
6.x-1.7

Internationalization tests
6.x-1.9

IMCE Wysiwyg API bridge
6.x-1.1

jQuery plugins
6.x-1.10

jQuery UI
6.x-1.4

Vertical Tabs
6.x-1.0-rc1

Wysiwyg
6.x-2.3

Views
6.x-2.12

Views exporter
6.x-2.12

Views UI
6.x-2.12

Webform
6.x-3.11

XML sitemap
6.x-2.0-beta2

XML sitemap custom
6.x-2.0-beta2

XML sitemap engines
6.x-2.0-beta2

XML sitemap internationalization
6.x-2.0-beta2

XML sitemap menu
6.x-2.0-beta2

XML sitemap modal UI
6.x-2.0-beta2

XML sitemap node
6.x-2.0-beta2

XML sitemap taxonomy
6.x-2.0-beta2

XML sitemap user
6.x-2.0-beta2
quicksketch’s picture

So I'm still largely at a loss here. As far as I can trace it back with this information I think something is going wrong inside of the webform_submission_send_mail() function (in webform.submissions.inc). The only thing I could see that would cause this would be if the $submission variable were emptied or mangled somewhere in that function (though I have no idea how that would happen).

cmartin3251’s picture

StatusFileSize
new28.23 KB

I'm baffled as to what the actual problem is as well. I have included the text from my submission function.

EDIT: See attachment.

quicksketch’s picture

Posting the contents of your code isn't going to help (unless you've modified it in some way). I already know you're using the 3.11 version of the module according to the issue version number.

cmartin3251’s picture

Do you have any other suggestions as to the resolution of this problem? I am at a loss as I have reinstalled the theme and the webform module.

quicksketch’s picture

Did you try changing your theme entirely (say to Garland, which we know won't have any problems)? Then we'd know for sure it's not the theme at least. None of the modules you've listed above look particularly suspicious, but when faced with such an odd problem sometimes the best you can do is start disabling modules until it starts working, then pinpoint the one causing it.

Of course I recommend doing all of this on a backup, as it will cause quite a disruption to your site.

cmartin3251’s picture

Alright, I have tried your suggestions and the problem is DEFINITELY the theme (ad_novous). When I submitted the form under the Garland Theme, it submitted fine with no issues. What should I do now?

quicksketch’s picture

Hmm, well I looked through the Ad Novus project's code and it's *very* minimal, I couldn't find anything that would cause this problem.

Worse yet, I thought maybe we'd pinned down the problem anyway so I downloaded ad_novus (1.6) and installed it on my local Drupal 6 site. I enabled the theme and filled out a webform that had e-mail configured. The e-mail came through perfectly fine, no errors on the front-end, and all values coming through into my inbox perfectly. So the mystery continues. :(

jonesmac’s picture

Thanks for picking this up again. I can confirm none of the stock drupal themes produce the issue for me. It is only when I make my own sub theme of garland or acquia that the same "array" errors occur for me as well. Unfortunately, all my sites that are live use webform 2.x to avoid the problem. Something changed in the 3.x branch that broke webform for me when using sub-themes. cmartin, can you confirm that you get the errors when using a sub-theme as well? Does webform 2.x still work for you? Perhaps we could at least narrow the scope of the affected code and modules.

vernond’s picture

@ jonesmac and cmartin3251 - A total shot in the dark here: Do both your themes have something along the lines of if ($submitted) { (or at least the $submitted variable) as used in the ad_novus theme node.tpl.php file? If so, are you doing anything to, with, or because of, that variable in your theme coding anywhere? I'm speculating that perhaps that variable and/or the submitted css class that gets assigned there is causing some kind of nonsense with the Webform submitted array.

The irritating thing is that my tests with ad_novous worked just fine (D6.22 + Webform 3.11), hence this is just a shot in the dark.

quicksketch’s picture

Oooo, a nice suggestion @vernond! Perhaps our variable is getting clobbered by template_preprocess_node(). But I have no idea exactly how that would be happening. Those variables should be safely scoped. Still, this is the best guess so far!

cmartin3251’s picture

Yes, I do have the submitted variable in my node.tpl.php.

<div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
  <?php if ($picture) {print $picture;}?>
  <?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>
  <?php if ($submitted) { ?><span class="submitted"><?php print $submitted?></span><?php } ?>
  <div class="taxonomy"><?php if ($terms) {print "Published in" . $terms; }?></div>
  <?php if ($links) { ?><div class="links-node"><?php print $links?></div><?php }; ?>
  <br clear="all"/>
  <div class="content"><?php print $content?></div>
</div>

Do you think this is the issue? I have not modified this file from the original as far as I can remember.

edit: removing or commenting out this line does NOT solve the issue.

vernond’s picture

Can you confirm which version of Drupal core you're running please. I really would like to be able to replicate this issue, mostly 'cos it just doesn't make proper sense.

In #10 you mention that the problem is intermittent (the *worst* kind of bug!). Have you been able to identify any possible trends at all? For example, is Devel active when the issue crops up, was theme registry refreshed just before... something, anything, anything at all. Even a wild guess would do :-)

jonesmac’s picture

Well I have effectively solved the issue for me. Here it goes:

1) The problem resided in the base theme declaration in the .info file of my sub-theme. In my case, I was using Acquia Marina as my base theme listed in my .info like so
base theme = Acquia Marina
Seemed right since that was how it was listed labeled inside the .info file.
However, the .info file for the Acquia Marina Theme was labeled "acquia_marina.info" Once I changed the declaration within my sub-theme to
base theme = acquia_marina
all my webform submissions were viewable and my missing argument errors were gone upon submitting through the webform!

FYI - I think the documentation in http://drupal.org/node/171205#base-theme isn't clear whether it wants the name of the base theme as it is declared in the .info file or the filename of the .info file itself.

2) So is it a webform issue or not? Well, as best as I understand it, something changed in the way webform 3.x processes through the theme. All my live sites that are running webform 2.x still work with the declaration as
base theme = Acquia Marina
However, once I upgrade them to 3.x I believe I know I will return to the missing argument errors.

quicksketch, does this make any sense to you? cmartin, check your setup and see if anything I just wrote can help you. Thanks for all your help. Again, I have reproduced this back and forth with webform 3.11 and changing the base theme declaration clearly brings up the missing argument errors.

quicksketch’s picture

Wow, thanks @jonesmac. No, that doesn't make any sense to me, though. ;)

If I get a chance I'll try out this situation and see if I can reproduce. In @cmartin3251's situation though, there isn't a base theme involved at all, the ad_novus theme is self-standing.

hanskuiters’s picture

@jonesmac: you made my day. I too had a problem with webform on one specific theme. I removed 'base theme' from the .info file and all works great.

jonesmac’s picture

Glad it worked :) I was using 2.x for way too long

magicmarkker’s picture

This is what fixed it for me:
If you have no base theme, completely take out the base theme = part in your .info file.
Having it just blank is what caused the Array errors for me... Hope that helps, it took me forever to figure this out and forever to find other people with the same problem

quicksketch’s picture

Title: warning: Missing argument 2 » warning: Missing argument 2 for _webform_display_select() (and other components) when using a base theme
Status: Active » Closed (fixed)

Great, well sounds like we have the culprit here. I've updated the title to reflect what actually caused the problem.