This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Query Bug


  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 15 years ago #
  2. yuniar

    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.


    MachForm Founder

    Posted 15 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 15 years ago #
  4. Torsten
    Member

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

    Torsten

    Posted 15 years ago #
  5. yuniar

    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?


    MachForm Founder

    Posted 15 years ago #
  6. Torsten
    Member

    Good morning,

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

    Torsten

    Posted 15 years ago #
  7. yuniar

    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.


    MachForm Founder

    Posted 15 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 15 years ago #
  9. yuniar

    Hmm.. I think I found it.
    I'll investigate this and update the result here.

    Meanwhile, have a great weekend!


    MachForm Founder

    Posted 15 years ago #
  10. Torsten
    Member

    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 15 years ago #
  11. yuniar

    Torsten -- thanks! I'm able to reproduce this.
    I'm working on a bugfix for this. I'll post here soon.


    MachForm Founder

    Posted 15 years ago #
  12. ggmaury
    Member

    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 15 years ago #
  13. yuniar

    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.


    MachForm Founder

    Posted 15 years ago #
  14. Torsten
    Member

    .... where is the download section?

    Torsten

    Posted 15 years ago #
  15. yuniar

    Login to Customer Area (look at the bottom of this site) using your account, then click downloads section.


    MachForm Founder

    Posted 15 years ago #
  16. Torsten
    Member

    How can I have an account? I have send you an email .....

    Posted 15 years ago #
  17. yuniar

    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.


    MachForm Founder

    Posted 15 years ago #
  18. Torsten
    Member

    Perfect! You have fixed the Bug! Great work!

    Posted 15 years ago #

RSS feed for this topic

Reply