verification message will not go away

mnymkr , December 05 2008
m
mnymkr

when I use the form in a module position , if i do not enter the correct verification code the error message will carry over to all other forms

let me give you an example

i have a form in a module position for a diamond quotes page

if i enter the incorrect SPAM letters I will get an error message

when I reenter the verification and it redirects to my front page

the message will appear for my front page form even though it is not anti spam

see here

http://www.bostondiamondexchange.com/beta/jewelry-a-diamond-quotes

admin

Hi mnymkr,

this is a known bug yes, I have posted a fix here some where few days ago, if you can't find it then let me know and I will post it again!

Regards
Max

g
guitoun

Hi Max,

I don't manage to find the file: can u post the link plz ?

Thanks a lot

Guillaume

m
mnymkr

i cannot find the fix either

i see where you discuss it but do not see a clear fix

admin

ok guys, here we go!

open components/com_chronocontact/chronocontact.php and find:

				if ( md5($chrono_verification ) != $sessionvar ) {
				


add below it :
				JRequest::setVar('cf_wrong_security_code', 1);
				


save and close!

now open chronocontact.html.php at the same directory and find:
				<?php if($session->get('chrono_verification_msg', '', md5('chrono'))){ ?>
				


make it :
				<?php if(($session->get('chrono_verification_msg', '', md5('chrono')))&&(JRequest::getVar('cf_wrong_security_code') == 1)){ ?>
				


regards
Max

g
guitoun

Hi Max and thanks for your time ...

I have made the modifications and it does not work for me.

If the captcha is wrong the message "You have entered an incorrect verification code at the bottom of the form" is submitted (that's correct). If the captcha is good i am redirected and the email is sent. But if click to my contact link 5 seconds later then i still have the "You have entered an incorrect verification code at the bottom of the form". That's weird because the form is empty at that moment...

Another problem: when the captcha is wrong i am not redirected to the same URL. My contact form is at index.php?option=com_content&view=article&id=16&Itemid=19 and i am redirected to index.php?option=com_chronocontact&task=send&chronoformname=Contact
Any way to correct that ?

Tested under IE 7.0 and Firefox 2.0 under Windows Vista.

Thanks again for your help
Guillaume

admin

Hi Guillaume,

the 2nd issue has no solution at the moment!

regarding the first one, are you testing the "component" page or the form in an article ? please test the pure form page because the fix was for this one, then we can fix the other the same way!

Regards
Max

g
guitoun

Hi Max,

Your are right. I was using the form in an article. When i use the component i no longer have the problem.

But now i have a display problem like the one mnymkr explained here:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=3&t=11844&p=18722&hilit=%3Cdiv%3E#p18722

See my attached file for a screenshot.

Any way to correct the captcha problem (form in an article) or to correct my template problem ? (i use the rockettheme "Metamorph v2" template) ?

For the link problem i saw that you posted a solution some time ago for the 2.5 version. Any way to get the same fix for the 3.0 ver ?

Thanks again for your time and your advices.
Guillaume

Attachments
bad.jpg
bad.jpg
(19.75 KiB)
5325 Downloads/Views
admin

Hi Guillaume,

for the layout issue, this will need some interaction with the CSS in the form or the css in your template, I think you need to remove the height:auto of the field or something, I'm really not sure, it depends on your template css too, you can try to disable the "load chronoforms files" setting at the general tab ?

the fix I mentioned for the verification code can be remade at plugins/content/chronocontact.php the only difference is that the 2 changes will be at the same file here!

where is the solution for the link problem ?

Max

g
guitoun

Hi Max,

You were right for the layout issue. I fixed the height value in the css file and the error goes away. Thanks !

I can't manage to find the

				if ( md5($chrono_verification ) != $sessionvar ) {
				
entry in the /plugins/content/chronocontact.php file. It seems easier (to me) to use the plugin/article way to make my contact page looks like ay other page. And under ie6 i have big problems cause the page is totaly messed-up.If that's not too time-consumming can u post the corrections to make to the /plugins/content/chronocontact.php file to correct the issue ? Thanks

For the link problem i am not able to find the forum post anymore. Looks like it was a dream :)

Thanks again for your time
Guillaume

admin

Hi, I checked it, you need only the 2nd fix for that file, the first fix is already done at the component files!

let me know!

Max

g
guitoun

You are the one Max ! It works great now with the article/plugin way ! Thanks

Only one problem left (the redirect link when the captcha is wrong) but i am sure that you are working on it :D
As a workaround is it possible to redirect to a static link ? I mean "hardcoding" in some file the path to my contact form so i am redirected to the good path ?

Thanks again
Guillaume

admin

Very good idea!! :) but you will lose the submitted data :|

lets try this, at the same place you added the first fix and after the line you added, paste this code:

				function curPageURL() {
$pageURL = 'http';
//if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}


after 2 lines you can find this line:
				showform($posted);
				


add just before it :
				$mainframe->redirect(curPageURL());
				


let me know!

Regards
Max

g
guitoun

Hi Max,

No success on this one. If a mistype the captcha i have the following message in IE 7:

Message

* Votre session a expiré, veuillez vous réidentifier

There is no form with this name or may be the form is unpublished, Please check the form and the url and the form management)



(in English the first line will be: your session has expired, please identify yourself)

I have the same message with Firefox 2.0

I post my 2 files (components/com_chronocontact/chronocontact.php and /plugins/content/chronocontact.php) with my reply so you can take a look. I have renamed /plugins/content/chronocontact.php to plugin_chronocontact.php for the upload

Thanks again
Guillaume

Attachments
files.zip
(10.22 KiB)
297 Downloads/Views
admin

show me the URL of the article page and the URL you are at when you get this error!

Regards
Max

g
guitoun

Hi Max,

You can test live here: http://joomlatest.hiezone.com

The contact form is the "CONTACT" item of my menu.

Thanks for your help
Guillaume

GreyHead

HI Max, Guillaume,

I just get the message "You are not allowed to access this URL" which normally points to extra <form> tags but I don't see any here. The form code looks perfectly OK and there are no JavaScript errors showing in FireFox.

Bob

g
guitoun

Hi Bob,

Thanks for your help.

I have enter some data in the fields and the wrong captcha code i have the "You are not allowed to access this URL"

If i undo the last modififcations i made to the chronocontact.php file the form is re-displayed with the "You have entered an incorrect verification code at the bottom of the form": i assume that is the correct behavior when the captach code is not correct.

But maybe i am wrong. I am a newbie in Joomla/php/css so feel free to correct me :D

Guillaume

GreyHead

Hi Guillaume,

Yes, the 'normal' behaviour is for that message to appear in a JavaScript alert box and for the form to be re-displayed when you click OK.

Bob

g
guitoun

Hi Bob,

Without any modification made to the files (ChronoForm component and mambot "out of the box") i don't have any Javascript Window when the captcha is wrong. I am only redirected to the empty form page with the "You have entered an incorrect verification code at the bottom of the form" on top. I assume that with the last modifications Max has given to me the behavior should be the same ?

For the moment i have the "You are not allowed to access this URL" message. Without the last modifications i am redirected like i explained just before but with the wrong path (ie index.php?option=com_chronocontact&task=send&chronoformname=Contact instead of index.php?option=com_content&view=article&id=16&Itemid=19
The last modification i made to chronoform.php were intentend to correct that behavior.

Thank you all
Guillaume

Powered by ChronoForums - ChronoEngine.com

ChronoForms Book

The ChronoForms Book, written for ChronoForms v3 contains 350 pages of invaluable ChronoForms How-tos hints and tips.

Note: many of the ideas can be used in ChronoForms v4 but the admin interface is very different and code examples may need to be modified.

SSL

Members Login

 

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com