Forums

Error 406 "Not Acceptable"

raifs 27 Oct, 2009
Hi,

have a little problem with chronoforms.

When I try to "save apply or cancel" one previously created form it says:

Not Acceptable
An appropriate representation of the requested resource /administrator/index2.php could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Creating a new form is OK.

I have attached 2 files one contains full form code and other one contain problem lines (without these lines i can create a form without error)

Hope you can help me..
raifs 27 Oct, 2009
I should add that i use Joomla 1.5.14 and and Chrono Contact 3.1 RC5.5

Tried to disable mod_security in htaccess and it gave me internal error 500.
GreyHead 27 Oct, 2009
Hi raifs,

I've never seen this error before. Looking at the problem text I'd guess that the YooToolTips are causing the problem that's the only code that looks odd
{yootooltip title=[<img src="images/stories/sisu/kalendrid/font_1_s.jpg">] width=[252] mode=[cursor] display=[block]}<img src="images/stories/sisu/kalendrid/font_1.jpg" width="250">{/yootooltip}


Do you have Plugins enabled on the form General tab?

Bob
raifs 27 Oct, 2009
Hi,

Thank you for your answer. I've been trying to solve the problem myself and found out that something is wrong with inserting javascript... tried with "jumi" and got the same error in other areas of joomla admin. So I'm thinking that it is my joomla's problem not chronocontact's. But it started when i was working with chronocontact - i remember in some point i put <script> tags in form code area - maybe that screwed up something? Can chronocontact somehow mess up some files if i did something wrong? Even with "Sourcerer" plugin - in the back-end i can see "script" tags but in html output they are gone.. Maybe you got some ideas

Regards,
Raivo
GreyHead 28 Oct, 2009
Hi Raivo,

This may be a result of a ChronoForms 'feature' - ChronoForms tries to evaluate the form code when you save your form so that it can extract a list of field names. This doesn't alwyas works correctly if there is complex code in the Form HTML.

Try putting the following code snippet at the beginning of your Form HTML - this will stop the evaluation.
<?php
if ( !$mainframe->isSite() ) return;
?>


Bob
xpla 04 Nov, 2009
I have the same problem.

If you only put in normal text he's able to save it. Just when entering something code like he stops working during saving and gives me this annoying failure.
xpla 04 Nov, 2009
AHHHHHHHHHHHHHHHH

Now all my forms aren't working. They get displayed but after sending i get:

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

How's it possible to mess up such a good plugin ...
xpla 04 Nov, 2009
I'm so angry!

Sure i have a backup of my site, but what does this help when i'm not able to touch the chronforms ...
Wuhha and this on an important live site ...
GreyHead 04 Nov, 2009
Hi xpla,

I think that is something different. The problem with evaluation on save shouldn't affect form submission at all.

What's the URL you see on the page with the error message?

Bob
xpla 04 Nov, 2009
The whole system gut screwed ...

I updated to the latest version hoping that will fix the problem. Now he displays me the saved forms (not new ones as saving doesn't work) but aufter submitting i get an error that the form doesn't exist.
xpla 04 Nov, 2009
This is the URL for saving:

URL OF MY SITE/administrator/index2.php#

and this is the code which i want to save:

<?php
if ( !$mainframe->isSite() ) return;
?>
<fieldset>
<legend>1. Anmeldung WM-SOUNDS Shuttlebus</legend>

<dl>
<dt><label class="cf_label" for="name-shuttle" style="width: 150px;">Name:</label></dt>
<dd><input class="required" maxlength="150" size="30" title="Bitte gib deinen Namen an!" id="text_2" name="name-shuttle" type="text" /></dd></dl>

<dl>
<dt><label for="email-shuttle" class="cf_label" style="width: 150px;">E-Mail:</label></dt>
<dd>
<input class="required validate-email" maxlength="150" size="30" title="Ungültige Mailadresse!" id="text_3" name="email-shuttle" type="text" value="<?php echo $_POST['email']; ?>"/></dd></dl>

<dl>
<dt><label for="anzahl-pers" class="cf_label" style="width: 150px;">Personen:</label></dt>
<dd>
<input class="required" maxlength="150" size="30" id="text_4" name="anzahl-pers" type="text" value="<?php echo $_POST['anzahl-pers']; ?>"/></dd></dl>

<dl>
<dt><label for="station" class="cf_label" style="width: 150px;">Station:</label></dt>
<dd>
<select name="station">
	<option>St. Martin/Raab (Martinihalle)</option>
	<option>Jennersdorf (Busstation Post)</option>
	<option>Grieselstein (Busstation)</option>
	<option>Loipersdorf (Busstation neben Kirche)</option>
	<option>Fürstenfeld (Busstation Schillerplatz)</option>
	<option>Übersbach (GH Schuchlenz)</option>
	<option>Hatzendorf (Busstation)</option>
	<option>Riegersburg (Busstation Mitte)</option>
	<option>Lembach-Egg (Busstation GH Schreiner)</option>
	<option>Neustift (Busstation)</option>
	<option>Ottendorf (Veranstaltungszentrum)</option>
</select>

</dd></dl>

<dl>
<dt><label for="chrono_verification">Check:</label></dt>
<dd>{imageverification}</dd></dl>

</fieldset>


<fieldset>
<legend>2. Nutzungsbedingungen</legend>
<p class="info-message-newsletter">"Ich erkläre mich damit einverstanden, dass ich kostenlos Informationen über
Veranstaltungen, Gewinnspiele und spezielle Aktionen von WM-Sounds erhalte. 
Wir geben die Daten niemals an Dritte weiter und am Ende jedes Newsletters
steht ein Hinweis, wie man sich jederzeit wieder abmelden kann."
</p><input type="submit" name="submit" id="submit" value="Anmelden" />
</fieldset>
GreyHead 04 Nov, 2009
Hi xpla,

Do you have code in any other boxes in the Form Editor?

Bob
xpla 04 Nov, 2009
No.

Ok, i tried it step by step, (every dl at once) WITHOUT any PHP Code, then it works. Now i have to proof if existing forms are working as they also got screwed.
xpla 04 Nov, 2009
Ok, this is what i can tell:

Existing forms now working, even if they have PHP Code in it (retrieving values from $_POST if any are stored). But you can't edit those existing forms, getting an 406 error ....
GreyHead 04 Nov, 2009
Hi xpla,

And if you add
<?php
if ( !$mainframe->isSite() ) return;
?>
before the PHP?

Bob

PS Results are a bit erratic but sometimes Apply will work when Save doesn't.
xpla 04 Nov, 2009
Nope, if there's something like PHP it doesn't work. Also tried apply/save .. No difference at all.
GreyHead 04 Nov, 2009
Hi xpla,

Then I think there is something different going on - I've had no problems since using the isSite() test :-(

Bob
xpla 22 Feb, 2010
Still having this 406 not acceptable error ... PLS HELP
This topic is locked and no more replies can be posted.