Topic: Empty Form Action

Another wierd thing happened when I moved to production. I have a page model that acts like a cms for certain areas one of them is contact us which also has a form.

My solution was write the form in the cms and it worked in development just fine. Now that I am in production the form renders with an empty action attribute.

Does any one have any insights

Thank you

Re: Empty Form Action

That's like just asking "Do you know why my code doesn;t work in production"
You need to provide far more detail for anyone to have the first clue. Remember - we can't see your code and no one has any idea what action attribute is, where it belongs or how it is supposed to be populated.

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Empty Form Action

Its working now out of no where. Maybe it was a weird cache thing.

So in development the form would get served like

<form id="new_contact_message" class="simple_form new_contact_message" action="/contact_messages" method="post" accept-charset="UTF-8">

Then in production it got served like

<form id="new_contact_message" class="simple_form new_contact_message" action method="post" accept-charset="UTF-8">

In the view I rendered with

<%= raw @page.content %>

The entry in the databases where exactly the same when I tested both of them in the console.

Its just when I made the request it ended up with an empty action attribute. I was wondering if any one had any insights into this pertaining to where in the stack it was likely that the action attribute was doped.

I did copy and past from one TinyMCE window to another and I noticed that it carried with

<form id="new_contact_message" class="simple_form new_contact_message" action="http://localhost/contact_messages" method="post" accept-charset="UTF-8">

I didn't notice before I tried it once and went back and examined it and removed the http://localhost at the database. Once I did that that's when the action attribute started coming up blank.

Then like I said I loaded it in a new browser and it started working in both browsers.

I was viewing the page in google chrome running on Ubuntu 12.04

Thank you I know its not a big deal but I like learning why things happen it helps me conceptualize more.

Last edited by tyger86 (2012-10-15 21:02:00)

Re: Empty Form Action

and removed the http://localhost at the database

? Why ?
you should ALWAYS connect to your database locally. Remote database connections for a web server is a massive undertaking even for the most experienced of technical people.

Its working now out of no where. Maybe it was a weird cache thing.

smile Cool! Perhaps capistrano failed to restart the server when you deployed the app to your production environment.

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)