Extention for Webform module - Webform Multiple File. Module provides new webform component, that allows users to upload multiple files. I know, that exist Webform Multiple File Upload, but the goal of my module - it works in Drupal way without JS and external libraries. Design of my module similar to file field widget, that allows correct validation and file processing.

Link to the project: https://drupal.org/sandbox/chalk/2151949

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/Chalk/2151949.git webform_multiple_file

I know that my module requires applying patch for Webform module, but I have already create feature request #2153723: Form_state values in _webform_render_component implementations to solve this task.

Reviews of other projects:
https://drupal.org/comment/8394291#comment-8394291
https://drupal.org/comment/8394437#comment-8394437
https://drupal.org/comment/8394545#comment-8394545

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxChalk2151949git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

Chalk’s picture

Issue summary: View changes
Chalk’s picture

I've fixed all syntax errors in code. See please - http://pareview.sh/pareview/httpgitdrupalorgsandboxchalk2151949git-7x-1x

About function naming: it is not possible to rename these functions - see webform_component_invoke() in webform.module file.

About form_state: in case of my module should be 'input' key.

Chalk’s picture

Status: Needs work » Needs review
Chalk’s picture

Issue summary: View changes
aroq’s picture

Copy-pasted function comments, like:

/**
* Implements _webform_theme_component().
*/
function _webform_theme_multiple_file() {

/**
* Implements _webform_edit_component().
*/
function _webform_edit_multiple_file($component) {

and other functions.

aroq’s picture

Status: Needs review » Needs work
Chalk’s picture

@aroq I wrote comments for functions like it was in webform module.

But OK - comments were changed according to your remark.

Chalk’s picture

Status: Needs work » Needs review
amreana’s picture

Status: Needs review » Needs work

Manual review:

Upon uploading a file i get this error:
Warning: Illegal string offset 'fid' in webform_multiple_file_managed_file_submit() (line 531 of /var/www/mysite/sites/all/modules/webform_multiple_file/webform_multiple_file.webform.inc).

Chalk’s picture

@amreana

Describe please your modules environment, version of Drupal and Webform module. Did you apply patch? I haven't seen this warning before. Module successfully works at more than 10 different sites

Chalk’s picture

Status: Needs work » Needs review

There is no answer from @amreana

Nitesh Sethia’s picture

@Chalk
I have tested your module and found that the code does not follow drupal standards.
All functions should be prefixed with your module name to avoid name clashes.

For your convenience, have a look at the issues pointed out in the link.
http://pareview.sh/pareview/httpgitdrupalorgsandboxchalk2151949git

Nitesh Sethia’s picture

Status: Needs review » Needs work
Chalk’s picture

@Nitesh Sethia
I have written in https://drupal.org/comment/8260925#comment-8260925 that function naming is defined by Webform module

Chalk’s picture

Status: Needs work » Needs review
Chalk’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus

Review bonus

klausi’s picture

Assigned: Unassigned » patrickd
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

manual review:

  1. please describe the differences to webform_multifile on your project page so that users don't get confused about the purpose of this module.
  2. _webform_render_multiple_file(): do not call theme() here, just add to the nested render array; Drupal will render the whole array later for you.

But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to patrickd as he might have time to take a final look at this.

Chalk’s picture

@klausi, thanks for review!

  1. I've described main differences between modules on project page.
  2. It seems impossible to remove theme() functions because theme_webform_element() and file_widget_multiple() don’t support render arrays for description element. My module is extention for Webform module and adapted to it. That’s why some pieces of code is not correct according to Drupal standarts. Also I have looked in Drupal core file_field_widget_form() – function also uses theme().
klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, Chalk!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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