Sudden strange error when loading a form

joit

Active Member
Hi,
I was adding elements when I suddenly became this error message if I load the form:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') FROM cargo WHERE = 937' at line 1 SQL=SELECT COUNT() FROM cargo WHERE = 937
This happens when I load this form
/index.php/ladung-eingeben
or
index.php?option=com_fabrik&view=form&formid=19

This came out of nowhere, no idea what caused this. I had certain hicups before but usually resaving the form or element could repair the issue.

Any ideas?

Thanks a bunch!
 
Element 937 belongs to group info_fracht_en and is a child element.
If it's unpublished (I've done this for testing at your site) the "laden" form is working, seems it's somehow addressing wrong elements.

Edit: the form is NOT working (I've clicked the "Ladung" list) but the error changed to
WHERE = 906
It seems to be related to element ids.

But you have about 200 elements in one form:eek:
And if you are adding elements to one list this element is created as a childelement in all other lists going to the same DB table. It's added to just the first (alphabetical?) group of these "related" lists which may create strange issues.
 
Last edited:
Hi troester,

thanks for your quick help!
I can see that you unpublished the element but I still get the same error. I unpublished the parent element and the other childs but no luck :(
I wanted to unpublish element 906 but I don't have an element with ID 906...
Do you have another idea?

Do you know what I could do abouth this
And if you are adding elements to one list this element is created as a childelement in all other lists going to the same DB table. It's added to just the first (alphabetical?) group of these "related" lists which may create strange issues.
?
Do I have too many elements for fabrik?
 
Additionally you have a lot of lists, forms, groups and elements in the trash...
e.g. element 906

I would back up and clean up.
You can try to set the Fabrik option "Global/unpublish cloned elements" to yes before creating new elements.
 
I emptied the thrash for everything but it didn't help.
I also deleted element 937 and I still get the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') FROM cargo WHERE = 937' at line 1 SQL=SELECT COUNT() FROM cargo WHERE = 937
I noticed another strange things. In a once working form I can't edit the elements any more (it looks like a details view with no permission to edit elements):
/index.php/fahrt-eingeben

I feel lost...
Any idea?
 
I don't think it's element ID's, I think it's user ID's.

I notice that 906 is the ID of our test user, and 937 is another test user.

Looking at the site now.

-- hugh
 
And the only thing I can think of which would count users on a form load is the limit plugin ... and sure enough, you have a limit plugin, where the "user element" is not selected. Which would indeed cause that "SELECT COUNT() WHERE = 906", because the field name to use as the user element isn't set. We should probably catch that and throw an exception.

I can't fix that as I don't know what element you want to use for the user element. So try setting that, and see if it fixes it.

-- hugh
 
I noticed another strange things. In a once working form I can't edit the elements any more (it looks like a details view with no permission to edit elements):
/index.php/fahrt-eingeben

I seem to be able to edit elements - the maps and the checkboxes work - I just can't move to the next page, as it's failing "notempty" validations on some empty fields (start and end) which are hidden by CSS.

-- hugh
 
Thanks guys,
it's really been the user that flew away from the limit form plugin. No idea how that happened, haven't touched that for ages.
For this
as it's failing "notempty" validations on some empty fields (start and end) which are hidden by CSS.
I blame my non existend CSS skills...
 
It does occasionally happen when you edit and save something. I really have no clue why, but I've had this happen to me for both elements and form plugins, when I edit and save the form or the element, and a setting will come "unstuck". Unfortunately it's one of those really hard ones to diagnose, as it happens very infrequently, and of course I don't notice as I'm saving, only when the problem manifests itself on the site. So I can't replicate and debug the issue.

It seems to only happen for settings which involve AJAX. Which, for example, form plugin settings do. We load up each plugin's settings as an AJAX call after loading the form's admin page. You'll notice this if you ever try and hit the "Save" button too quickly, before the plugin settings have finished loading, as we'll tell you "The form hasn't finished loading yet" and refuse to save it - to avoid losing plugin settings.

I suspect that the infrequent issue with individual settings getting lost is something bizarre going on in the Javascript. Maybe as strange as an errant mouse click on the page while the DOM is loading, getting relayed through to a setting. Or some code executing asyncronously too soon, before the DOM is fully built.

The only other time this can happen is if we rename a param, but that hardly ever happens, and wasn't the case with the limit plugin.

-- hugh
 
Thanks for the info.
When the error occured, I was playing around with special characters in the label of an element so I thought maybe that's the reason. I tried to reproduce, but the everything worked fine.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top