Recent Topics

1 Jul 13, 2016 21:39    

I'm hoping someone can help - my contact form that used to work is now failing and I don't know why.

Here is the page: http://superiorautonw.com/index.php/contact/email/

Here is the code:

<form class="bComment" method="post" action="http://superiorautonw.com/htsrv/message_send.php"> 
<div><span style="float:right"></span> 
<script type="text/javascript"> 
							var nb_dynamicSelects = 0;
							var tab_dynamicSelects = Array();
						</script> 
	<fieldset> 
		<div class="label"><label>To:</label></div> 
		<div class="info"><strong>Todd(at)SuperiorAutoNW.com</strong></div> 
	</fieldset> 
 
	<fieldset id="ffield_d"> 
<div class="label"><label for="d">From:</label></div> 
<div class="input"><input maxlength="50" class="bComment form_text_input" value="" size="40" type="text" name="d" id="d" /> 
 <span class="notes">Your name.</span></div> 
</fieldset> 
 
<fieldset id="ffield_f"> 
<div class="label"><label for="f">Email:</label></div> 
<div class="input"><input maxlength="100" class="bComment form_text_input" value="" size="40" type="text" name="f" id="f" /> 
 <span class="notes">Your email address.</span></div> 
</fieldset> 
 
<fieldset id="ffield_g"> 
<div class="label"><label for="g">Subject:</label></div> 
<div class="input"><input maxlength="255" class="bComment form_text_input" size="40" type="text" name="g" id="g" /> 
 <span class="notes">Subject of email message.</span></div> 
</fieldset> 
 
<fieldset id="ffield_h"> 
<div class="label"><label for="h">Message:</label></div> 
<div class="input"><img src="http://superiorautonw.com/rsc/img/blank.gif" width="1" height="1" alt="" /><textarea cols="40" class="bComment form_textarea_input" name="h" id="h" rows="15"></textarea><img src="http://superiorautonw.com/rsc/img/blank.gif" width="1" height="1" alt="" /><br /><span class="notes"></span></div> 
</fieldset> 
 
<fieldset class=" fieldset"> 
 
		<div class="input"> 
						<input name="submit_message_1" class="submit" value="Send message" type="submit" /> 
		</div> 
		</fieldset> 
 
	<div class="clear"></div> 
 
</div><div style="height:0"><input name="blog" type="hidden" value="1" /> 
<input name="recipient_id" type="hidden" value="1" /> 
<input name="post_id" type="hidden" /> 
<input name="comment_id" type="hidden" /> 
<input name="redirect_to" type="hidden" value="/index.php/home/?blog=1" /> 
</div> 
</form>

And this is the error I get:

Bad Request!

The parameters of your request are invalid.

If you have obtained this error by clicking on a link INSIDE of this site, please report the bad link to the administrator.

Go back to home page

2 Jul 13, 2016 21:47

@ethan5150 I'm not able to test using your version right now. I guess that is a customised form, so why don't you use the regular contact form?

Can you please enabled debug mode and share the output? If you are able to do it within the next 30 minutes, I'm available to take a look at the debug output directly from your site.

Please let me know.

Regards!

3 Jul 13, 2016 21:52

Thanks Manuel!

I tried adding this to my _advanced.php file but it doesn't seem to work:

$debug_pwd = 'debug';

When I go to http://superiorautonw.com/index.php/contact/email/?debug=debug it doesn't seem to change anything.

I didn't use the built-in contact form because when I built this site I wanted to customize the look of the form and this was the best way to accomplish that...

4 Jul 13, 2016 21:56

All right, please set $debug = '1'; for a moment, I will let you know to switch back to its original value.

6 Jul 13, 2016 21:58

All right, please set $debug = '1'; for a moment, I will let you know to switch back to its original value.

This is done

7 Jul 13, 2016 22:00

Please disable debug mode. My answer in a few minutes.

8 Jul 13, 2016 22:21

@ethan5150 as I guessed, your form is missing an important security field added several version ago (your contact form might be failing from a long time ago now).

The missing field is a crumb, which is basically a technique intended to avoid external pages sending data to your site. This crumb can be only generated from "inside" of b2evolution, because it's based on the current session stablished at the time the form is displayed.

In a few words, I think that with some code effort (no idea how is actually implemented your form), you can manage to add the correct crumb to the form, making b2evolution able to process it. However, I think it doesn't worth the effort, and that you can use the default contact form instead.

Before to going through, would you like to upgrade your site to the current stable version? It's way easier to help you working with a recent version. Besides of the tons of extra features that you will get from an updated site :D


Form is loading...