[SOLVED] Error - Field Rules

Post Reply
User avatar
urbanus
Posts: 23
Joined: 11 Dec 2021, 01:49
Name: Carlos Botelho
Location: Brasil, Macapá, AP
Company Name: Urbanus Consultoria e Sistemas
Contact:

[SOLVED] Error - Field Rules

Post by urbanus »

Database Error: 1064 - 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 'order by sort_order, name' at line 1
Query: select * from app_forms_tabs where parent_id=0 and entities_id= order by sort_order, name
Page: /index.php?module=forms_fields_rules/rules&action=get_fields_choices&entities_id=29&id=&token=9pXizU5DOI&fields_id=null
#0 includes/functions/database.php(87): mysqli_query(Object(mysqli), 'select * from a...')
#1 includes/classes/model/forms_tabs.php(59): db_query('select * from a...')
#2 includes/classes/model/forms_fields_rules.php(132): forms_tabs::get_tree('')
#3 modules/forms_fields_rules/actions/rules.php(168): forms_fields_rules::fields_by_form_tab_helper('', 'visible_fields')
#4 index.php(20): require('/home1/urbanu55...')
#5 {main}
Last edited by urbanus on 21 Jan 2023, 22:52, edited 1 time in total.
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Error - Field Rules

Post by support »

Can't reproduce this issue.
User avatar
urbanus
Posts: 23
Joined: 11 Dec 2021, 01:49
Name: Carlos Botelho
Location: Brasil, Macapá, AP
Company Name: Urbanus Consultoria e Sistemas
Contact:

Re: Error - Field Rules

Post by urbanus »

Hello Sergey ;
I already found out why the error happened, I was wanting to create a rule in a field that is read-only, that is, it does not appear in the form only in the listing.
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

Re: [SOLVED] Error - Field Rules

Post by Didou12 »

Yes,

Same here, when no field is available, I think this error pops up.
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
yaoying
Posts: 133
Joined: 10 Apr 2023, 23:23
Name: 耀影
Location: 深圳
Company Name: 深圳市耀影科技有限公司
Contact:

Re: [SOLVED] Error - Field Rules

Post by yaoying »

I also ran into it, should prompt that no fields are available, instead of an error code
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: [SOLVED] Error - Field Rules

Post by support »

Can someone reproduce this issue on personal demo https://www.rukovoditel.net/demo.php and give me the link to the demo. I will check.
yaoying
Posts: 133
Joined: 10 Apr 2023, 23:23
Name: 耀影
Location: 深圳
Company Name: 深圳市耀影科技有限公司
Contact:

Re: [SOLVED] Error - Field Rules

Post by yaoying »

Import the template Job Tracking Template
https://www.rukovoditel.net/database_te ... .php?id=29

Application Structure >> Entities List >> Stock >> View Configuration >> Display Fields Rules >> Add a new rule


Error

Code: Select all

Database Error: 1064 - 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 'order by sort_order, name' at line 1
Query: select * from app_forms_tabs where parent_id=0 and entities_id= order by sort_order, name
Page: /3.3/index.php?module=forms_fields_rules/rules&action=get_fields_choices&entities_id=27&id=&demo_id=2146&token=AE1eR81sKd&fields_id=null
#0 includes/functions/database.php(87): mysqli_query()
#1 includes/classes/model/forms_tabs.php(59): db_query()
#2 includes/classes/model/forms_fields_rules.php(132): forms_tabs::get_tree()
#3 modules/forms_fields_rules/actions/rules.php(168): forms_fields_rules::fields_by_form_tab_helper()
#4 index.php(20): require('/home/admin/web...')
#5 {main}

https://pdemo.rukovoditel.pro/3.3/index ... mo_id=2146
Attachments
截图_选择区域_20230430235132.png
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: [SOLVED] Error - Field Rules

Post by support »

Found issue. It happens because no fields available to setup rules.
File from archive replace to modules\forms_fields_rules\actions\
Now there is no error.
Attachments
screenshot-localhost-2023.04.30-19_59_33.png
rules.zip
(1.99 KiB) Downloaded 96 times
yaoying
Posts: 133
Joined: 10 Apr 2023, 23:23
Name: 耀影
Location: 深圳
Company Name: 深圳市耀影科技有限公司
Contact:

Re: [SOLVED] Error - Field Rules

Post by yaoying »

Thank you, the error has been resolved.
Didou12
Posts: 487
Joined: 14 Jan 2023, 14:53
Name: Louis
Location: Montreal, Canada

Re: [SOLVED] Error - Field Rules

Post by Didou12 »

Thank you Sergey
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
Post Reply