Forums

404 on submit, though URL is valid

megana 22 Jun, 2015
I have an odd thing happening...I have a form in a module. I have tried using the CF5 module and also just using a Custom HTML module with the plugin code in it. Both have the same result.

When I submit the form, it's supposed to run a DB Save action and then redirect to mydomain.com/success, but instead I get a 404 error. I tried setting the form action to mydomain.com/success instead, but same result. I also tried setting Relative URL to No and using the standard Joomla URL instead of the SEF URL.

I copied the URL and pasted it into a new browser tab and it loads just fine. But for some reason when I try to access that page via CF redirect or form action, it gives a 404 error.

Any ideas on this one?
megana 24 Jun, 2015
No one?😟
megana 06 Jul, 2015
So unusual to get zero responses here!
GreyHead 07 Jul, 2015
Hi Megana,

I've seen a couple of forms that behave like this - it seems to be a problem with the recent Joomla! SEF URLs.

The safest solution I have found is to create a 'hidden' menu i.e. one that isn't displayed. Add a new ChronoForms5 item to the menu called say submit-my-form (I'm sure you'll find something better) and, on the Options tab, add the form name and put submit in the Event box.

Then in the form HTML (Render Form) action set the Action URL to the menu alias e.g. submit-my-form

This seems to get round the problems with SEF URLs and gives you a neat short URL for the form submitting.

Bob
megana 09 Jul, 2015
Hi Bob,

Thanks for the response. I already had tried that, but when you mentioned SEF URLs it made me try it with the non-SEF url for the Action URL. That didn't work, but it made me realize that the problem was my hidden field called "id". It was interfering with the article ID that Joomla was trying to load. I renamed my hidden field and now everything works!

Whew, thanks much!
This topic is locked and no more replies can be posted.