Version 2.x has a textarea field for "Confirmation message or redirect URL".

Version 3.x breaks this field out into; 1) a textarea for "Confirmation message" and 2) a set of radio buttons for "Redirection location".

When the 2.x "Confirmation message or redirect URL" field is a confirmation message, and not a redirect URL, the upgrade path from 2.9 to 3.11 does not correctly set the 3.x "Redirection location"; The "Redirection location" should be set to "Confirmation page" in order to have the same behaviour in both 2.9 and 3.11; Where the webform-submitter is shown a custom confirmation message after successfully submitting the webform.

However "Redirection location" gets set to "Custom URL" and the corresponding text <input> is blank. This results in the webform-submitter—upon successful webform submission—being returned to the same webform, but empty and with no confirmation message at all.

The immediate fix is to manually set "Redirection location" to "Confirmation page" after upgrading. However it would be nice if the bug in the upgrade path could be fixed.

Related; #1022578: redirect location changed to custom url after upgrading

CommentFileSizeAuthor
#5 webform_fix_update_6321.patch696 bytesquicksketch
#1 2.9.png97.43 KBBevan
#1 3.11.png104.25 KBBevan

Comments

Bevan’s picture

StatusFileSize
new104.25 KB
new97.43 KB

Here are two screen shots of before upgrading from 2.9 to 3.11 showing the incorrect setting.

quicksketch’s picture

Thanks Bevan.

abrao’s picture

You can fix this with an additional update hook
update_sql("UPDATE {webform} SET redirect_url = '<confirmation>' WHERE redirect_url IS NULL");

The update hook 6321 did not work because redirect_url was NULL not an empty string ('').

Bevan’s picture

Status: Needs work » Needs review

Turning this into a patch is trivial, so I am bumping to "needs review".

quicksketch’s picture

Status: Needs review » Fixed
StatusFileSize
new696 bytes

I've committed this modification which should be backwards compatible. The use of the "default" option really should convert everything for us, but obviously the presence of the UPDATE query itself indicates that this isn't working as expected. In any case, this patch should do the job. Thanks for helping with this one Bevan and runhrun, update issues are always a pain.

Status: Fixed » Closed (fixed)

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