Error logged: Undefined index: Qform__FormCallType

Login or register to post comments
5 replies [Last post]
Offline
Joined: 04/01/2008

So I set up the error logging tools (very useful) but I've noticed a strange error getting recorded a few times each night. I am unable to replicate this error. I was wondering if anyone else has experienced this. Perhaps some sort of bot is causing it?

Here is the error:
Undefined index: Qform__FormCallType
Error Type: E_NOTICE

Rendered Page: Click here to view contents able to be rendered

Source File: /var/www/html/includes/qcodo/_core/qform/QFormBase.class.php Line: 159

Line 154:
Line 155: if ($objClass) {
Line 156: global $$strFormId;
Line 157: $$strFormId = $objClass;
Line 158:
Line 159: $objClass->strCallType = $_POST['Qform__FormCallType'];
Line 160: $objClass->intFormStatus = QFormBase::FormStatusUnrendered;
Line 161:
Line 162: if ($objClass->strCallType == QCallType::Ajax)
Line 163: QApplication::$RequestMode = QRequestMode::Ajax;
Line 164:

alex94040's picture
Offline
Joined: 11/06/2008

This is actually an error that I myself have seen sporadically. On a moderately-trafficked site, I'd see this two-three times a week; I'm pretty clueless as to what may be causing it. If you come across a reliable repro, I'd be very interested to hear about it (do open a ticket). Thanks!

agsel's picture
Offline
Joined: 04/02/2008

I once had the same error and it came out, that service provider had some kind of a restriction about POST variables. I had a page with hundreds of textfields. When I removed some of them, things were working fine. So, it came out, that maximum 64 POST variables were allowed. Because I had 100 textfields, QCubed variables were never received by the server after the request (first 64 was sent).

Though I'm not sure that there cannot be other cases for this.

Offline
Joined: 05/15/2009

I have similar error long time ago in my production site.
It is usually caused by incompatible browser such as using certain mobile phone browser or any browser with disabled javascript.

I modified my custom QCubed 1.1 (originally from my custom QCodo 3.43) like this

Original QFormBase::Run line 157-162 (QCubed 1.1)

if ($objClass) {
global $$strFormId;
$$strFormId = $objClass;

$objClass->strCallType = $_POST['Qform__FormCallType'];
$objClass->intFormStatus = QFormBase::FormStatusUnrendered;

I derived this in QForm::Run() - by copying the whole Run() from QFormBase with modification like this:

if ($objClass) {
global $$strFormId;
$$strFormId = $objClass;

if (array_key_exists('Qform__FormCallType', $_POST)) {
$objClass->strCallType = $_POST['Qform__FormCallType'];
} else {
echo QApplication::Translate('Your request cannot be processed due to incompatible browser or disabled javascript in your browser.');
exit();
}
$objClass->intFormStatus = QFormBase::FormStatusUnrendered;

Offline
Joined: 06/25/2009

Is there any valid work around for this issue besides simply telling them they don't support javascript? I have a task to develop a mobile version of an app, and I'm running into this issue with some of the 'older' mobile devices I'm testing with.

Thanks, as always!

Offline
Joined: 03/31/2008

Currently no, but we're trying to ensure v2.0 works without javascript as much as possible, watch the status of this ticket:
http://trac.qcu.be/projects/qcubed/ticket/37