Appnitro Software Forums » MachForm

Query Bug

(18 posts)
  • Started 2 years ago by realestsrv
  • Latest reply from Torsten

  1. realestsrv
    Member

    Getting the following error on some new forms I created. Query failed: Unknown column 'element_2' in 'field list' "element_2" is not a part of the new form. How do we correct this bug?

    It apparently appears when copying forms and then deleting a field from the original.

    Copied and created new forms, but deleted a field that apparently was "element_2" and no longer a part of the new form.

    Posted 2 years ago #
  2. Hmm.. thanks for reporting this.
    What was the type of field you have deleted?

    To fix this, open your ap_form_elements table.
    Search for record with element_id = 2 and form_id = your current form id.

    If you found it, simply delete that record.

    Posted 2 years ago #
  3. realestsrv
    Member

    Deleted (or renamed) a Text field. Same problem keeps recurring if I copy a form and delete (or perhaps when I rename a field) - not sure if the deletion or renaming that causes the problem)

    Posted 2 years ago #
  4. I had the same problems. Checkboxes (10) caused the same problems. I have changed this to 5 x 2 checkboxes.... Realy strange

    Torsten

    Posted 2 years ago #
  5. Hmmm.. I can't seem to reproduce the errors.
    Would you folks share me some detail to reproduce?

    realestsrv --
    Is it like this:
    1) Created form A
    2) Duplicate form A, which result to Form B
    3) Edit Form B, removed a text field
    4) Problem occured with Form B

    Am I right?

    Torsten --
    Are you doing the same thing as above?

    Posted 2 years ago #
  6. Good morning,

    no. I have setup the form. Include the 10 checkboxes - no copy, no beer ... :-)

    Torsten

    Posted 2 years ago #
  7. no copy and no beer? what about tea? :-)

    Hmm.. so weird.
    Try to create a new form with 10 checkboxes again.

    If the problem persist and you would like me to investigate, feel free to mail me with your MachForm login info.

    I'll check it.

    Posted 2 years ago #
  8. realestsrv
    Member

    I've figured out your bug!!! Yes!!!

    1) Created form A with a TEXT FIELD MARKED REQUIRED
    2) Duplicate form A, which result to Form B
    3) Edit Form B by REMOVING A REQUIRED TEXT FIELD
    4) Problem occured with Form B when clickin on entries

    Posted 2 years ago #
  9. Hmm.. I think I found it.
    I'll investigate this and update the result here.

    Meanwhile, have a great weekend!

    Posted 2 years ago #
  10. I have setup a brand new form - no copy, no paste no delete...

    2 textfields
    1 checkbox field with 10 boxes

    I stored informations in the form

    In admin, I was editing entry #1. I clicked two checkboxes.

    Saving....

    Message:

    UPDATE ap_form_3 set element_1='Hans',element_2='Super',element_3_1='1',element_3_2='',element_3_3='',element_3_4='',element_3_5='1',element_3_6='1',element_3_7='',element_3_8='',element_3_9='1',element_3_10='',element_3_11='1',element_3_12='',element_3_13='',element_3_14='',element_3_15='',element_3_16='',element_3_17='',element_3_18='',element_3_19='',element_3_110='',element_3_111='',date_updated='2008-05-18 12:24:47' where id='1'; Query failed: Unknown column 'element_3_12' in 'field list'

    Best

    Torsten

    Posted 2 years ago #
  11. Torsten -- thanks! I'm able to reproduce this.
    I'm working on a bugfix for this. I'll post here soon.

    Posted 2 years ago #
  12. I don't know if it's related to this post but...

    I had 9 forms then deleted 2 and created a new one.

    In machform I see forms 1 to 8 but in the database I have form_id 1 to 7 and the last one is form_id 10 so the form numbers don't match between machform and db.

    Is that a bug? I suppose they should match.

    Posted 2 years ago #
  13. I've just updated machform package (version 2.0.f).

    To fix the above bugs, please download the latest package from downloads section and update the following files:
    - includes/post-functions.php
    - delete_element.php
    - delete_element_option.php

    ggmaury -- nope, that one is not a bug. each form is having unique id which is assigned by the time the form being created.

    Posted 2 years ago #
  14. .... where is the download section?

    Torsten

    Posted 2 years ago #
  15. Login to Customer Area (look at the bottom of this site) using your account, then click downloads section.

    Posted 2 years ago #
  16. How can I have an account? I have send you an email .....

    Posted 2 years ago #
  17. It was sent to your email after the purchase.
    If you didn't get any, it might be the spam filter.

    I've replied to your email and send you the account.

    Posted 2 years ago #
  18. Perfect! You have fixed the Bug! Great work!

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.