Hi,
I'm using the ChronoForm version 3.1 RC5.5 on my Joomla! 1.5.15. Couple of my visitors are reporting and send me a schreenshot that they are getting the following error when then click on "Submit" button:
"You are not allowed to access this URL"
This is not happening for everyone and when I test it on my computer it works perfectly fine. I had other visitors submitted the form with no problem. Only 3-4 visitors reported the issue.
Any idea what is causing this and how to fix it?
I'm using the ChronoForm version 3.1 RC5.5 on my Joomla! 1.5.15. Couple of my visitors are reporting and send me a schreenshot that they are getting the following error when then click on "Submit" button:
"You are not allowed to access this URL"
This is not happening for everyone and when I test it on my computer it works perfectly fine. I had other visitors submitted the form with no problem. Only 3-4 visitors reported the issue.
Any idea what is causing this and how to fix it?
Hi,
This error usually means your visitors failed the Joomla Token Check, which is used to prevent robots from hitting forms and reduce spam. This is implemented using a hidden form input at the end of the form, with a random name and value 1.
One possible reason for the behaviour you are describing, is malformed html-code within the form, causing some browsers to prematurely close the form element - thus not including the security token. Could you post a link to the form in question?
/Fredrik
This error usually means your visitors failed the Joomla Token Check, which is used to prevent robots from hitting forms and reduce spam. This is implemented using a hidden form input at the end of the form, with a random name and value 1.
One possible reason for the behaviour you are describing, is malformed html-code within the form, causing some browsers to prematurely close the form element - thus not including the security token. Could you post a link to the form in question?
/Fredrik
Thank you for your detailed answer. The form is only accessable to logged in users. Here is the form full code. Let me know if this helps. If not I can arrange for your access to the form.
<?php
// Get user ID
if ( !$mainframe->isSite() ) { return; }
$user = & JFactory ::getUser();
$current_user_id = $user->id;
//Show customized message per user status:
if ($current_user_id == 0)
echo "<b>Dear User:</b><br />This page is available only to our registered members. If you are a registered member, please log into your account to access this page. <br />If you are not a registered member <a href=\"http://www.iama.org/component/comprofiler/registers\" target=\"_top\">Join us today</a> to take advantage of the member's benefits.";
else
echo '<div class="form_item">
<div class="form_element cf_heading">
<h1 class="cf_text">Scholarship Registration</h1>
</div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">First Name</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_0" name="fname" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Last Name</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_1" name="lname" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Address</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_2" name="address" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">City</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_3" name="city" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">State</label>
<select class="cf_inputbox validate-selection" id="select_4" size="1" title="" name="state">
<option value="">Choose Option</option>
<option value="AA">AA</option>
<option value="AE">AE</option>
<option value="AE">AE</option>
<option value="AE">AE</option>
<option value="AE">AE</option>
<option value="AK">AK</option>
<option value="AL">AL</option>
<option value="AP">AP</option>
<option value="AR">AR</option>
<option value="AS">AS</option>
<option value="AZ">AZ</option>
<option value="CA">CA</option>
<option value="CO">CO</option>
<option value="CT">CT</option>
<option value="DC">DC</option>
<option value="DE">DE</option>
<option value="FL">FL</option>
<option value="FM">FM</option>
<option value="GA">GA</option>
<option value="GU">GU</option>
<option value="HI">HI</option>
<option value="IA">IA</option>
<option value="ID">ID</option>
<option value="IL">IL</option>
<option value="IN">IN</option>
<option value="KS">KS</option>
<option value="KY">KY</option>
<option value="LA">LA</option>
<option value="MA">MA</option>
<option value="MD">MD</option>
<option value="ME">ME</option>
<option value="MH">MH</option>
<option value="MI">MI</option>
<option value="MN">MN</option>
<option value="MO">MO</option>
<option value="MP">MP</option>
<option value="MS">MS</option>
<option value="MT">MT</option>
<option value="NC">NC</option>
<option value="ND">ND</option>
<option value="NE">NE</option>
<option value="NH">NH</option>
<option value="NJ">NJ</option>
<option value="NM">NM</option>
<option value="NV">NV</option>
<option value="NY">NY</option>
<option value="OH">OH</option>
<option value="OK">OK</option>
<option value="OR">OR</option>
<option value="PA">PA</option>
<option value="PR">PR</option>
<option value="PW">PW</option>
<option value="RI">RI</option>
<option value="SC">SC</option>
<option value="SD">SD</option>
<option value="TN">TN</option>
<option value="TX">TX</option>
<option value="UT">UT</option>
<option value="VA">VA</option>
<option value="VI">VI</option>
<option value="VT">VT</option>
<option value="WA">WA</option>
<option value="WI">WI</option>
<option value="WV">WV</option>
<option value="WY">WY</option>
</select>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Zip Code</label>
<input class="cf_inputbox required validate-number" maxlength="150" size="30" title="" id="text_5" name="zip_code" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Phone Number</label>
<input class="cf_inputbox required validate-number" maxlength="150" size="30" title="" id="text_6" name="phone" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Email Address</label>
<input class="cf_inputbox required validate-email" maxlength="150" size="30" title="" id="text_7" name="email" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"><label class="cf_label" style="width: 150px;">Date of Birth</label>
<select class="cf_inputbox validate-selection" id="select_24" size="1" title="" name="month">
<option value="">Month</option>
<option value="Jan">Jan</option>
<option value="Feb">Feb</option>
<option value="Mar">Mar</option>
<option value="Apr">Apr</option>
<option value="May">May</option>
<option value="Jun">Jun</option>
<option value="Jul">Jul</option>
<option value="Aug">Aug</option>
<option value="Sep">Sep</option>
<option value="Oct">Oct</option>
<option value="Nov">Nov</option>
<option value="Dec">Dec</option>
</select>
<select class="cf_inputbox validate-selection" id="select_25" size="1" title="" name="day">
<option value="">Day</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select class="cf_inputbox validate-selection" id="select_23" size="1" title="" name="year">
<option value="">Year</option>
<option value="2000">2000</option>
<option value="1999">1999</option>
<option value="1998">1998</option>
<option value="1997">1997</option>
<option value="1996">1996</option>
<option value="1995">1995</option>
<option value="1994">1994</option>
<option value="1993">1993</option>
<option value="1992">1992</option>
<option value="1991">1991</option>
<option value="1990">1990</option>
<option value="1989">1989</option>
<option value="1988">1988</option>
<option value="1987">1987</option>
<option value="1986">1986</option>
<option value="1985">1985</option>
<option value="1984">1984</option>
<option value="1983">1983</option>
<option value="1982">1982</option>
<option value="1981">1981</option>
<option value="1980">1980</option>
<option value="1979">1979</option>
<option value="1978">1978</option>
<option value="1977">1977</option>
<option value="1976">1976</option>
<option value="1975">1975</option>
<option value="1974">1974</option>
<option value="1973">1973</option>
<option value="1972">1972</option>
<option value="1971">1971</option>
<option value="1970">1970</option>
<option value="1969">1969</option>
<option value="1968">1968</option>
<option value="1967">1967</option>
<option value="1966">1966</option>
<option value="1965">1965</option>
<option value="1964">1964</option>
<option value="1963">1963</option>
<option value="1962">1962</option>
<option value="1961">1961</option>
<option value="1960">1960</option>
<option value="1959">1959</option>
<option value="1958">1958</option>
<option value="1957">1957</option>
<option value="1956">1956</option>
<option value="1955">1955</option>
<option value="1954">1954</option>
<option value="1953">1953</option>
<option value="1952">1952</option>
<option value="1951">1951</option>
<option value="1950">1950</option>
</select>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Place of Birth</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_9" name="birth_place" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text"><strong>United States Medical Licensing Examination (USMLE) Score:</strong></span> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">USMLE Step 1</label>
<input class="cf_inputbox validate-number" maxlength="150" size="30" title="" id="text_27" name="usmle_1" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">USMLE Step 1 :: 2 or 3 digit score.</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">USMLE Step 2 CK</label>
<input class="cf_inputbox validate-number" maxlength="150" size="30" title="" id="text_28" name="usmle_2" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">USMLE Step 2 CK :: 2 or 3 digit score.</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">USMLE Step 3</label>
<input class="cf_inputbox validate-number" maxlength="150" size="30" title="" id="text_29" name="usmle_3" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">USMLE Step 3 :: 2 or 3 digit score.</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text"><strong>What scholarship would like to apply to?</strong></span></div>
</div>
<div class="form_item">
<div class="form_element cf_checkbox">
<input value="Kaplan" title="" class="radio validate-one-required" id="check00" name="check0[]" type="checkbox" />
<label for="check00" class="check_label">Kaplan</label>
<input value="Americlerckship" title="" class="radio validate-one-required" id="check01" name="check0[]" type="checkbox" />
<label for="check01" class="check_label">Americlerckship</label>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">What scholarship would like to apply to? :: Select at least one. You can also selct both if you are interested in applying to both scholarships.</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text"><strong>If you are a medical sutdent submit your medical school student card.<br />
If you are a physician, submit a copy of your medical diploma</strong></span> </div>
</div>
<div class="form_item">
<div class="form_element cf_fileupload">
<label class="cf_label" style="width: 200px;">Student card or Diploma</label>
<input class="cf_fileinput cf_inputbox required" title="" size="20" id="file_11" name="card_diploma" type="file" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Student card or Diploma :: Allowed formats: .jpg, .jpeg, .pdf, and .gif. Max file size: 500 KB</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text"><strong>Submit your current or final transcript and GPA</strong></span></div>
</div>
<div class="form_item">
<div class="form_element cf_fileupload">
<label class="cf_label" style="width: 200px;">Transcript and GPA</label>
<input class="cf_fileinput cf_inputbox required" title="" size="20" id="file_14" name="gpa" type="file" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Transcript and GPA :: Allowed formats: .jpg, .jpeg, .pdf, and .gif. Max file size: 500 KB</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text"><strong>If you hold any additional degree such as BA, BS, MS, MPH, MBA, or PhD or you are an enrolled student for any of the above mentioned or additional degree in a university, please submit a copy of your degree or your current student ID card:</strong></span> </div>
</div>
<div class="form_item">
<div class="form_element cf_fileupload">
<label class="cf_label" style="width: 200px;">Additional Degree</label>
<input class="cf_fileinput cf_inputbox" title="" size="20" id="file_17" name="additional_degree" type="file" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Additional Degree :: Allowed formats: .jpg, .jpeg, .pdf, and .gif. Max file size: 500 KB</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text"><strong>Submit your current curriculum vitae:</strong></span> </div>
</div>
<div class="form_item">
<div class="form_element cf_fileupload">
<label class="cf_label" style="width: 200px;">Curriculum Vitae</label>
<input class="cf_fileinput cf_inputbox required" title="" size="20" id="file_19" name="cv" type="file" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Curriculum Vitae :: Allowed formats: .jpg, .jpeg, .pdf, and .gif. Max file size: 500 KB</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text"><strong>Submit a complete list of your publications and presentations:</strong></span> </div>
</div>
<div class="form_item">
<div class="form_element cf_fileupload">
<label class="cf_label" style="width: 200px;">Publications / Presentations</label>
<input class="cf_fileinput cf_inputbox" title="" size="20" id="file_20" name="publications" type="file" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Publications / Presentations :: Allowed formats: .jpg, .jpeg, .pdf, and .gif. Max file size: 500 KB</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_captcha">
<label class="cf_label" style="width: 200px;">Enter the verification code</label>
<span>{imageverification}</span> </div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button" align="center">
<input type="reset" name="reset" value="Reset"/>
<input value=" Submit " name="button_22" type="submit" />
</div>
</div>
<div class="cfclear"> </div>';
?>
Hi,
That code looks proper, and atleast validates cleanly using w3.org's validator on my testsite.
Next on the list, possibly sessions expiring while users are filling out the form. This usually redirects the visitor to a page stating "session expired" though..
A workaround would be to disable the tokencheck in your form setup (on the General Tab).
/Fredrik
That code looks proper, and atleast validates cleanly using w3.org's validator on my testsite.
Next on the list, possibly sessions expiring while users are filling out the form. This usually redirects the visitor to a page stating "session expired" though..
A workaround would be to disable the tokencheck in your form setup (on the General Tab).
/Fredrik
Hi,
That is... puzzling at best. The part responsible for that error is located within chronocontact.php around line 111-114:
If the tokencheck is disabled, the above code would not be executed, regardless of the actual JRequest::checkToken() call.
There is one issue where the session has expired, and checkToken() causes a redirect regardless of the checkToken setting (ordering issue, not caring for php's "lazy evaluation"), however this results in a completely different message: "Your session has expired. Please log in again."
Since, however, your users don't get that error, I doubt this is the issue..
Do you know if these users are using a certain browser, or anything else you can think of they've got in common?
Could you also PM me details to access the form on a Live site, just to make sure there's nothing in your template causing troubles, or plugins, etc misbehaving?
/Fredrik
That is... puzzling at best. The part responsible for that error is located within chronocontact.php around line 111-114:
// Block SPAM through the submit URL
if((!JRequest::checkToken()) && $MyForm->formparams('checkToken', 1)){
echo "You are not allowed to access this URL";
return;
}
If the tokencheck is disabled, the above code would not be executed, regardless of the actual JRequest::checkToken() call.
There is one issue where the session has expired, and checkToken() causes a redirect regardless of the checkToken setting (ordering issue, not caring for php's "lazy evaluation"), however this results in a completely different message: "Your session has expired. Please log in again."
Since, however, your users don't get that error, I doubt this is the issue..
Do you know if these users are using a certain browser, or anything else you can think of they've got in common?
Could you also PM me details to access the form on a Live site, just to make sure there's nothing in your template causing troubles, or plugins, etc misbehaving?
/Fredrik
This topic is locked and no more replies can be posted.