fields icon indicating copy to clipboard operation
fields copied to clipboard

GLPI 9.5.5 + Fields 1.12.4

Open EC2311 opened this issue 3 years ago • 1 comments

Bonjour

J'ai un certain nombre de champs dans un container. Parmi ces champs, un champ de type utilisateur, nommé 'Garant' dans Fields : OK.

La recherche via la page Utilisateur en selectionnant ce champs (donc secondaire) genere l'erreur suivante :

Unknown column 'glpi_users_061925467072ae4235bba36574a8d39f.name' in 'where clause' in query "SELECT DISTINCT glpi_users.id AS id, 'xxxxxxx' AS currentuser, GROUP_CONCAT(DISTINCT CONCAT(glpi_users.name, '$#$' , glpi_users.id) ORDER BY glpi_users.id SEPARATOR '$$##$$') AS ITEM_User_1, glpi_users.realname AS ITEM_User_34, glpi_users.firstname AS ITEM_User_9, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(glpi_useremails.email, 'NULL'), '$#$',glpi_useremails.id) ORDER BY glpi_useremails.id SEPARATOR '$$##$$') AS ITEM_User_5, GROUP_CONCAT(DISTINCT CONCAT(glpi_groups_220a6d1caa053710cb89097d56bf1391.completename, '$#$' , glpi_groups_220a6d1caa053710cb89097d56bf1391.id) ORDER BY glpi_groups_220a6d1caa053710cb89097d56bf1391.id SEPARATOR '$$##$$') AS ITEM_User_13, GROUP_CONCAT(glpi_profiles_69a91398655a63f4c04eb186c99faef6.name SEPARATOR '$$##$$') AS ITEM_User_20, GROUP_CONCAT(glpi_profiles_users.entities_id SEPARATOR '$$##$$') AS ITEM_User_20_entities_id, GROUP_CONCAT(glpi_profiles_users.is_recursive SEPARATOR '$$##$$') AS ITEM_User_20_is_recursive, GROUP_CONCAT(glpi_profiles_users.is_dynamic SEPARATOR '$$##$$') AS ITEM_User_20_is_dynamic, glpi_users.last_login AS ITEM_User_14, glpi_authldaps_auths_id_87a71a8930394def944f9b3ce6beda6e.name AS ITEM_User_30, glpi_users.is_active AS ITEM_User_8, glpi_users.date_sync AS ITEM_User_23, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(glpi_users_garanttwofield_061925467072ae4235bba36574a8d39f.name, 'NULL'), '$#$',glpi_users_garanttwofield_061925467072ae4235bba36574a8d39f.id) ORDER BY glpi_users_garanttwofield_061925467072ae4235bba36574a8d39f.id SEPARATOR '$$##$$') AS ITEM_User_76682 FROM glpi_users LEFT JOIN glpi_profiles_users ON (glpi_users.id = glpi_profiles_users.users_id ) LEFT JOIN glpi_useremails ON (glpi_users.id = glpi_useremails.users_id ) LEFT JOIN glpi_groups_users ON (glpi_users.id = glpi_groups_users.users_id )LEFT JOIN glpi_groups AS glpi_groups_220a6d1caa053710cb89097d56bf1391 ON (glpi_groups_users.groups_id = glpi_groups_220a6d1caa053710cb89097d56bf1391.id )LEFT JOIN glpi_profiles AS glpi_profiles_69a91398655a63f4c04eb186c99faef6 ON (glpi_profiles_users.profiles_id = glpi_profiles_69a91398655a63f4c04eb186c99faef6.id )LEFT JOIN glpi_authldaps AS glpi_authldaps_auths_id_87a71a8930394def944f9b3ce6beda6e ON (glpi_users.auths_id = glpi_authldaps_auths_id_87a71a8930394def944f9b3ce6beda6e.id AND glpi_users.authtype = 3 ) LEFT JOIN glpi_plugin_fields_userhierarchieads ON (glpi_users.id = glpi_plugin_fields_userhierarchieads.items_id AND glpi_plugin_fields_userhierarchieads.itemtype = 'User' ) LEFT JOIN glpi_users AS glpi_users_garanttwofield_061925467072ae4235bba36574a8d39f ON (glpi_plugin_fields_userhierarchieads.garanttwofield = glpi_users_garanttwofield_061925467072ae4235bba36574a8d39f.id ) WHERE glpi_users.is_deleted = 0 AND ( (glpi_users_061925467072ae4235bba36574a8d39f.name LIKE '%29782%' ) ) GROUP BY glpi_users.id ORDER BY glpi_users.name ASC"

Error: Unknown column 'glpi_users_061925467072ae4235bba36574a8d39f.name' in 'where clause' Backtrace : inc\search.class.php:1204
inc\search.class.php:320 Search::constructData() inc\search.class.php:95 Search::getDatas() inc\search.class.php:80 Search::showList() front\user.php:42 Search::show()

A priori cela viendrait d'un champ que j'ajoute en vue (via la clé) Ce champ est listé, je le selectionne. puis ensuite patatras.

comme si un lien (?) manquait dans une table ?

EC2311 avatar Aug 13 '21 13:08 EC2311

A priori cela doit etre du au type de champ. En effet c'est le seul champ qui est de type 'utilisateur'

J'ai supprimé le champ de la vue : ok, plus de plantage

Je rajoute un champ supplémentaire du meme type (Utilisateur) Je l'ajoute ensuite dans les elements visibles

Je fais une recherche dans les elements visibles : meme souci, plantage. Je fais une recherche en selectionnant ce champ : meme plantage je fais une recherche en selectionnant un autre champ : pas de souci

EC2311 avatar Aug 19 '21 15:08 EC2311

Bonjour

j'ai toujours ce souci, en 1.12.8. A priori cela se confirme sur le type de champs 'Utilisateurs'

Est-ce que d'autres personnes utilisent un champs supplémentaire de type 'Utilisateur' ? Merci

EC2311 avatar Dec 01 '22 09:12 EC2311

Hello @EC2311 Could you post in English? Thank you, Regards, Tomolimo

tomolimo avatar Dec 01 '22 18:12 tomolimo

Hello @tomolimo

Among the new fields I added, there is a field type 'user' : ok

as soon as i add a field, whatever the new fields, in the main view (for instance front/user.php, using the key), and I have new fields linked to users with a field 'user' type) there are dump in mysql.log (like the one I put in the beginning)

there is no problem when there is no field type 'user' or, if there is no 'new fields' added in the main view...

EC2311 avatar Dec 02 '22 14:12 EC2311

Hello @EC2311 As far as I understand your issue: you have a User field within a container that applies to User type? If so there was a bug that has been fixed by this PR: https://github.com/pluginsGLPI/fields/pull/577 Thank you, Regards, Tomolimo

tomolimo avatar Dec 05 '22 07:12 tomolimo

Hello @tomolimo

thanks for your reply and actions Unfortunately, as I am still in 9.5.5, the fixed is only for glpi 10. I will have a look to see if the fix can be easily 'duplicated' in 9.5.5 and in in fact 1.12.8, Perhaps I will have to upgrade already in 1.13.0 which is the last for 9.5...

Thanks Regards

EC2311 avatar Dec 05 '22 10:12 EC2311

Hello @EC2311 For my own GLPI 9.5.5 instance, I did a backport of this fix :) Thank you, Regards, Tomolimo

tomolimo avatar Dec 05 '22 15:12 tomolimo

There has been no activity on this issue for some time and therefore it is considered stale

If this issue is related to a bug, please try to reproduce on latest release (GLPI and plugin). If the problem persist, feel free to open a new issue.

If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.

stonebuzz avatar Feb 22 '24 07:02 stonebuzz