Hello!

First off - thank you for this great module.
I have run into a bug:

1.) Hide a structured text webform component using webform conditionals
2.) Submit the webform with the structured text component still hidden

Get this error:
Warning: implode(): Invalid arguments passed in _webform_submit_structured_text() (line 582 of C:\inetpub\wwwroot\mysite\modules\webform_structured_text\structured_text.inc).

You will receive this error for each structured text component that was hidden upon submission.

If the user meets certain conditions within the webform, and the structured text component is shown, this error does not occur.

Using latest version of Webform 4 for Drupal 7.
Can someone lend a hand?

*Edit - I noticed a partial incompatibility disclaimer on the module page - however it seems that this incompatibility is only related to that extra module that is no longer needed for webform 4?

Thanks for your help,
-Wrench

Comments

TheWrench’s picture

Issue summary: View changes
sdsheridan’s picture

Assigned: Unassigned » sdsheridan

I think I may know what the issue is, and have applied a change to the -dev version (which should be updated shortly). Can you try that and see if it solves your problem? Also, please test the case where you enter a value, and then change the governing field so the structured text field with data in it becomes hidden. Please give it a good test to ensure it is working as it should, and let me know. If all is good, I'll roll a new production version.

Also, is it just the warning that is disconcerting (as opposed to it's doing something to the underlying data)?

Shawn

sdsheridan’s picture

Priority: Major » Normal
Status: Active » Needs review
TheWrench’s picture

I'm sorry it took me so long to get back to you! My company put me on a different project, but now I am back on this.
Your fix worked! I have tested all possibilities, and it looks like the issue is resolved.

Please let me know if there is anything else I can do to help.
-Wrench

sdsheridan’s picture

Status: Needs review » Reviewed & tested by the community

Great. As soon as I get confirmation that #2582767: No option for 'unique' is also working, I'll roll a production version.

Shawn

sdsheridan’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 1.7.

rkdesantos’s picture

After applying the upgrade to v1.7 on a Drupal 6.37 site, the site operates fine however attempts to run update.php result in a WSOD. Backing down to v1.6 allows update.php to run properly.

sdsheridan’s picture

Can you tell me what the error message is that you're getting?

rkdesantos’s picture

Unfortunately there was no error message in the Drupal log or on screen. I'm happy to make another attempt if you can point me in the right direction to get an error message for you.

sdsheridan’s picture

Go through the steps you did to generate the WSD, and when that screen appears, there should be a "Fatal error" type message indicating the nature of the error and the file that generated it. Also, the error should be in your PHP error log, the location of which is set in your php.ini file. Are you testing this locally, or are you on a shared server somewhere?

rkdesantos’s picture

I repeated the process, got a blank white screen and no message on screen, in the Drupal log, or the error and system logs from cPanel for my shared host. I will ask the host admin to check the php log for anything around the time I tried again with 1.7 and update.php.

Edit#1
The error reported was:
[30-Nov-2015 13:38:48] PHP Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/.../.../sites/all/modules/webform_structured_text/structured_text.inc on line 295

Edit#2
The error is also triggered when I try to save settings on other modules.

sdsheridan’s picture

Can I ask what version of PHP you're running?

rkdesantos’s picture

This particular installation is running PHP 5.2. I'll check but there is a reason it is stuck on 5.2 but I don't recall offhand why. The server has versions up to 5.6 available.

sdsheridan’s picture

Ah... that explains it... the module now uses a construct of PHP 5.3 (and above) to check RegExs. I will put that on the module page and in the .info file.

Shawn

rkdesantos’s picture

Thanks for the clarification. I have moved the site to php 5.3.29 and I will reinstall v1.7 of the module and let things go for a few days to see how the site behaves. Initially things are good with only one php error from another module that so far seems harmless.

Edit#1: installed module v1.8 and no problems with the install. The site did get another error in another module due to php 5.3 but that was readily fixed.

sdsheridan’s picture

Excellent! Thanks for the update.

Shawn

Status: Fixed » Closed (fixed)

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