formtools / core

The Form Tools Core.
https://formtools.org
205 stars 78 forks source link

Fatal error: Uncaught PDOException: SQLSTATE[HY093]: #799

Closed dvddrn8 closed 3 years ago

dvddrn8 commented 3 years ago

This message comes up when Publish this form is pressed. First time creating and evaluating Form Tools. I did select Form Builder to create a new form. Is Form Builder a purchased module? @dvddrn8 Error HY093 using Form Builder.txt

sys-int2021 commented 3 years ago

Just installed formtools for the first time and got the same error.

I resolved it as follows:

  1. Open file: formtools\global\code\Views.class.php
  2. Goto line 911
  3. Change the $ in front of form_id to : so it reads WHERE v.form_id = :form_id
  4. Save the file
  5. Restart your webserver (ie Apache)
  6. Refresh the Publish Forms page before clicking on the Publish this Form button again

The form builder popup will now be displayed.

dvddrn8 commented 3 years ago

Thank you for your input on this error. My PHP file Views.class.php must have been already corrected at time of my download. It reads: SELECT * FROM {PREFIX}views v, {PREFIX}list_groups lg WHERE v.form_id = $form_id AND v.group_id = lg.group_id ORDER BY lg.list_order, v.view_order

I checked every occurrence of ‘form_id’ in the PHP file and they are correct.

Hopefully someone would find a specific fix to my error. In the mean time I will continue in trying to find the cause of my error.

David Duran @.**@.>

@.***D76BFE.33453DC0] Industrial Electronics Services, Inc Physical Address: 122 Kwickway Lane, Gray, TN 37615 Phone: 423-477-0118 Fax: 423-477-8700 Web: www.iesgray.comhttp://www.iesgray.com/

Mailing Address: 213 Suncrest Street, Gray, TN 37615 @.**@.D76BFE.33453DC0]

From: sys-int2021 @. Sent: Friday, June 25, 2021 4:06 PM To: formtools/core @.> Cc: David Duran @.>; Mention @.> Subject: Re: [formtools/core] Fatal error: Uncaught PDOException: SQLSTATE[HY093]: (#799)

Just installed formtools for the first time and got the same error.

I resolved it as follows:

  1. Open file: formtools\global\code\Views.class.php
  2. Goto line 911
  3. Change the $ in front of form_id to : so it reads WHERE v.form_id = :form_id
  4. Save the file
  5. Restart your webserver (ie Apache)

The form builder popup will now be displayed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/formtools/core/issues/799#issuecomment-868805771, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APVZ7Y7IFZK7DEVJ4GQ5TKTTUTOTRANCNFSM47IQYBZA.

Confidentiality Notice and Disclaimer

This message and any included attachments are confidential and are intended solely for the addressee(s). If you received this message in error, or have reason to believe you are not authorized to receive it, do not disseminate, distribute or copy this email. Please promptly delete this message and notify the sender by e-mail with a copy to @.**@.?Subject=Email%20Security>. No liability is accepted for any unauthorized use of the information contained in this transmission. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. We make no warranties as to the accuracy or completeness of this email and accept no liability for its content or use.

WARNING: E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The recipient should check this email and any attachments for the presence of viruses and/or errors. The company accepts no liability for any damage caused by any virus transmitted by this email.

Industrial Electronics Services, Inc http://www.iesgray.com

sys-int2021 commented 3 years ago

Your WHERE statement is saying $form_id this is wrong, it should say :form_id as it is placeholder for a variable used within a prepare statement. If you follow the instructions given you will find it corrects this error.

dvddrn8 commented 3 years ago

You are correct. Thank you. I need another cup of coffee.

It is great to have your support. Many Thanks.

David Duran From: sys-int2021 @. Sent: Monday, June 28, 2021 9:26 AM To: formtools/core @.> Cc: David Duran @.>; Mention @.> Subject: Re: [formtools/core] Fatal error: Uncaught PDOException: SQLSTATE[HY093]: (#799)

Your WHERE statement is saying $form_id this is wrong, it should say :form_id as it is placeholder for a variable used within a prepare statement. If you follow the instructions given you will find it corrects this error.