Email field with user email by default show "%useremail" to anonymous users into the textfield

Additionally:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY sid ASC, cid ASC, no ASC' at line 1 query: SELECT s.*, sd.cid, sd.no, sd.data, u.name, u.mail, u.status FROM webform_submissions s LEFT JOIN webform_submitted_data sd ON sd.sid = s.sid LEFT JOIN users u ON u.uid = s.uid WHERE sd.nid = 4 AND s.sid IN () ORDER BY sid ASC, cid ASC, no ASC in /var/www/vhosts/httpdocs/sites/all/modules/webform/webform_submissions.inc on line 168.

Comments

cdale’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB
new1.6 KB

For the first problem you mention, I'm assuming that you are not logged in when you are viewing the form? (I hope so anyway, because that's the only way it makes sense:))

The second problem is a small bug where an empty value is not checked for. I've attached a patch that should fix both problems.

danielb’s picture

I am experiencing this exact same bug in Drupal 6. (for anonymous users only)

quicksketch’s picture

Title: Show %useremail and warning on SQL query after update to last version 6.x-2.4 » Empty results tab generates SQL error
Status: Needs review » Fixed

The first problem already has a patch at #357687: %username and %useremail not removed for anonymous users (Please only submit one problem per issue, to prevent this exact sort of duplication).

Marking #360686: empty results tab generates SQL error as duplicate of this issue, since this one has a patch for it.

Thanks cdale for another excellent fix. Committed to D5 and 6 branches.

danielb’s picture

I googled this problem, and this is the ONLY issue I found. The other issue you linked to was not found. I don't think anyone is intentionally trying to be a pain by reporting issues a second time. The first one was just not easily findable.

alexanderceb’s picture

Sorry, title of previous post is not completely descriptive.
Thanks by fix.

quicksketch’s picture

I googled this problem, and this is the ONLY issue I found. The other issue you linked to was not found.

You're right danielb. I was commenting in #3 just that issues should not be bundled together. This issue was posted before the other one, so jceballosr certainly isn't at fault for duplicating issues. The second user might have opened the duplicate issue because this issue covered two different problems.

So no worries all around. Sorry for any confusion.

Status: Fixed » Closed (fixed)

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

quicksketch’s picture

Status: Closed (fixed) » Fixed

Keeping this open until the 2.5 release comes out.
#368008: MySQL error messages when using webform marked as duplicate.

Anonymous’s picture

I appreciate your fixing this, however, I'm not familiar with the process of applying a patch.
Will this fix also be incorporated into the next update for WebForm?

quicksketch’s picture

You can always download the development version to get the latest fixes (Visit the project page, click "View all releases"). I'm planning on getting out a 2.5 version if I can figure out #358640: Date and Time Fields Loose Value in Multipage Forms.

Anonymous’s picture

thanks for your efforts. using the dev version resolved the problem.

Regards,

Techgy

Status: Fixed » Closed (fixed)

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

zedxprt’s picture

Title: Empty results tab generates SQL error » Empty results tab generates SQL error - what need to be done on Multi site hosting
Assigned: Unassigned » zedxprt
Category: bug » support
Priority: Normal » Critical
Status: Closed (fixed) » Active
Issue tags: +webform mysql error on multi sites

I am facing the same problem. I have created a webform and added the component. It was running fine, One of my client requested to limit the submissions to 100, so I got a PHP snippet and i inserted in "Advance form Processing" box in my webform settings and clicked save. Once saved, submissions got locked and throwing out the message that the submissions are closed. but, later i got the same error message and even if i am removing the php snippet, the error message remains same and anonymous users cannot able to see the form and the its Access Denied. I re-checked with permissions aswell.

Plz help.

quicksketch’s picture

Title: Empty results tab generates SQL error - what need to be done on Multi site hosting » Empty results tab generates SQL error
Assigned: zedxprt » Unassigned
Category: support » bug
Priority: Critical » Normal
Status: Active » Closed (fixed)

Please file a new issue.