Hi,
Recently upgraded to webform 3.2. We've gone into webform settings > Webform-enabled content types and selected a content type for webforms to appear on. Now several days later users who are authenticated (but not the administrator) are seeing a message 'Submissions for this webform are closed' on every node of this content type even if it doesn't have a web form created on it.
Hope this makes sense. This only started when we moved from 3.1 to 3.2 and then some days after the upgrade. I've looked all over the permissions and webform settings and cannot find anything that suggests why this has happened. We've also noticed that when setting up a webform in 'form settings' that the submission limit is not working correctly - it doesn't let you put a number in and the drop down springs back up.
Can anyone point us in the right direction.
Thanks -
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | webform_previous_content_fix.patch | 1.38 KB | quicksketch |
| #2 | webform_previous_content_fix.patch | 966 bytes | quicksketch |
Comments
Comment #1
khorby commentedI've noticed the issue with the "Submissions for this webform are closed" message today as well. It only seems to occur on nodes for content types that the webform is enabled for.
I resolved the issue by doing the following: go to mysite.com/admin/settings/webform and under "Webform-enabled content types:" remove the checks from all content types except webform.
Hope this helps.
Comment #2
quicksketchThanks, I've finally reproduced this issue by switching to a different user than user #1. To reproduce:
- Install Drupal and Webform.
- Create a piece of story content.
- Visit admin/settings/webform and enable webforms on stories.
- Now visit your first piece of store content that was created prior to webform-enabling stories, as any user other than user #1.
- Message for "Submissions for this form are closed." is shown.
This problem is caused only for nodes created BEFORE webform-enabling the content type. The problem is that there is no webform data associated with that node at all, so when the webform is loaded form the database there aren't any existing roles that can submit the (non-existent) form.
This patch should correct the problem, it prevents any further loading of Webform information if no webform record exists. Not only does it fix the bug, but it saves 3 queries per webform-enabled node.
Comment #3
quicksketchThis patch prevents further queries by skipping access control, previous submission queries, and all other work that Webform does when viewing a node if no webform information has ever been created. Even more efficient and prevents the problem in two different ways.
Comment #4
quicksketchI've committed the patch from #3. Thanks for the reports guys.