Skip to content

[2.9.0] Do not show forms in form tab #1606

@jvergacas

Description

@jvergacas

No forms are displayed on the forms tab when using a technician profile or higher.

No Forms

The sql-error.log file indicates:
[2020-01-13 18:00:46] glpisqllog.ERROR: DBmysql::query() in /var/www/html/inc/dbmysql.class.php line 188
*** MySQL query error:
SQL: SELECT glpi_plugin_formcreator_forms.id, glpi_plugin_formcreator_forms.name, glpi_plugin_formcreator_forms.description FROM glpi_plugin_formcreator_forms WHERE glpi_plugin_formcreator_forms.plugin_formcreator_categories_id = '0' AND glpi_plugin_formcreator_forms.is_active = '1' AND glpi_plugin_formcreator_forms.is_deleted = '0' AND glpi_plugin_formcreator_forms.helpdesk_home = '1' AND glpi_plugin_formcreator_forms.language IN ('0', '', NULL, 'pt_BR') AND ((access_rights <> '2' OR glpi_plugin_formcreator_forms.'id' IN (SELECT profiles_id FROM glpi_plugin_formcreator_forms_profiles WHERE profiles_id = '4'))) ORDER BY glpi_plugin_formcreator_forms.name ASC
Error: Unknown column 'glpi_plugin_formcreator_forms.'id'' in 'IN/ALL/ANY subquery'
Backtrace :
inc/dbmysqliterator.class.php:95
inc/dbmysql.class.php:580 DBmysqlIterator->execute()
plugins/formcreator/inc/form.class.php:2168 DBmysql->request()
plugins/formcreator/inc/form.class.php:719 PluginFormcreatorForm->showForCentral()
inc/commonglpi.class.php:485 PluginFormcreatorForm::displayTabContentForItem()
ajax/common.tabs.php:92 CommonGLPI::displayStandardTab()
{"user":"250@menzel"}

To correct the problem, I replaced line 2257 of:
"$form_table.'id'" => new QuerySubQuery([

To:
"$form_table.id" => new QuerySubQuery([

And the problem was solved.
OK

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions