I have a custom module that is essentially a form that takes data from logged in clients and submits it to the site’s database. Since I’ve migrated from one host to another though clients have been unable to use the form. They can enter the data but when the press submit it redirects to the wrong page and the data is not entered in the database.
By using firebug for firefox (which allows you to temporarily change code on the fly for a live site), I was able to figure out that the problem is due to an additional backslash being added to the submit url. Sounds simple enough but I cannot for the life of me figure out how to remove the additional backslash. For example, when I look at the source via firebug, I see this as the submit action:
<form action="http://mysite.com//mytraining/submit/wyN7FfFJWa/" method="post">
If I leave it as is, the form does not submit the data and it redirects the user to the main index page. If I use firebug and change the submit action to
<form action="http://mysite.com/mytraining/submit/wyN7FfFJWa/" method="post">
with only 1 backslash it works perfectly.
The problem is I can’t figure out how to permanently remove the second backslash. In the pertinent template the relevant code says this:
{exp:hpc_client_training:form_details form_hash="{segment_3}"}<h2>{form_title}</h2>{/exp:hpc_client_training:form_details}
{exp:hpc_client_training:submit form_hash="{segment_3}" redirect="/mytraining/report/{segment_3}/"}
I’ve attached the actual module since posting the relevant code exceeded the post length restrictions.
This seems like such a minor problem and I’ve looked around for hours now but haven’t been able to find where that second backslash is coming from as it doesn’t appear anywhere else on the site. If any one can take a look I would REALLY appreciate it.
