Developer forum

Forum » CMS - Standard features » Receipt URL in forms for editors has double PID causing it to break

Receipt URL in forms for editors has double PID causing it to break

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

When I output the ReceiptUrl in an email template for Forms For Editors like this:

@GetString("Submit.ReceiptUrl")

I end up with a double PID in the URL:

/Default.aspx?ID=61&PID=59&pid=59&s=WQBqAEsAbAA2AGoAUwB0ADUAVABBAD0A

This then causes the module to fail loading the filled in form.

Looks like this code in Frontend.vb is causing it:

template.SetTag("Submit.ReceiptUrl", String.Format("{0}?{1}", Context.Current.Request.ServerVariables("SCRIPT_NAME"), Context.Current.Request.ServerVariables("QUERY_STRING")) & "&pid=" & ParagraphId & "&s=" & submit.SubmitToken)

 

There's already a PID in the querystring, and then another is added explicitly. The first one seems to come from the form:

<form method="post" action="/Admin/Public/404.aspx" enctype="multipart/form-data" class=" DMForms" id="dw-form-3" onsubmit="s=function(e){e.elements['FormCH1_h'].value='e5b48be0d492e9385f10e7467bcdca0d';e.elements['_sys_to_email'].value='';e.setAttribute('action', '/Default.aspx?ID=61&PID=59');return true};return s(this);">

Bug, right?

 

 


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Bump. Any ideas? Bug? Work around?

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Bump. Any ideas? Bug? Work around?

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Yes, a bug, TFS#50543, fixed and ready for test.

Workaround would be to do a string replace on the tag value to remove the double &pid if present...

Sorry about the inconvenience, Nicolai

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Great, thank you!

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply
This post has been marked as an answer

Hi Imar

The problem regarding #50543 "pid in receipt url" has now been resolved in Dynamicweb version 9.4.12

To upgrade please choose this version from backend or download from here:

http://doc.dynamicweb.com/releases-and-downloads/releases

Let me know if you need any more help regarding this

Kind Regards
Dynamicweb Support
Kristian Kirkholt

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Just upgraded to 9.4.14 and it's working now. Thanks!

 

You must be logged in to post in the forum