Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.53k stars 2.81k forks source link

Mysql error on fichinter list when line desc are not shown #30847

Open LucasRaynaud opened 3 months ago

LucasRaynaud commented 3 months ago

Bug

Hello,

When I disable show of desc, duration and date of intervention lines, I get the Mysql error :

Dolibarr a détecté une erreur technique. Ces informations peuvent être utiles à des fins de diagnostic (vous pouvez définir l'option $dolibarr_main_prod sur '1' pour masquer les informations sensibles): Date: 20240904101012 Dolibarr: 17.0.2 - https://www.dolibarr.org Niveau de fonctionnalités: 0 PHP: 8.1.29 Server: nginx/1.22.0 OS: Linux 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0

Url sollicitée: /fichinter/list.php Referer: Gestionnaire de menu: eldy_menu.php

Modules/Applications: syslog, user, api, fckeditor, agenda, cron, expensereport, holiday, service, societe, import, modulebuilder, categorie, h2g2, mailing, lareponse, export, ficheinter, contrat, notification, ispconfig, product Type gestionnaire de base de données: mysqli Requête dernier accès en base en erreur: SELECT f.ref, f.ref_client, f.rowid, f.fk_statut as status, f.description, f.datec as date_creation, f.tms as date_update, f.note_public, f.note_private, s.nom as name, s.rowid as socid, s.client, s.fournisseur, s.email, s.status as thirdpartystatus, c.rowid as contrat_id, c.ref as contrat_ref, c.ref_customer as contrat_ref_customer, c.ref_supplier as contrat_ref_supplier FROM llx_fichinter as f LEFT JOIN llx_contrat as c on f.fk_contrat = c.rowid, llx_societe as s WHERE f.entity IN (1) AND f.fk_soc = s.rowid ORDER BY fd.date DESC LIMIT 26 Code retour dernier accès en base en erreur: DB_ERROR_NOSUCHFIELD Information sur le dernier accès en base en erreur: Unknown column 'fd.date' in 'order clause'

Dolibarr Version

17

Environment PHP

No response

Environment Database

No response

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

ksar-ksar commented 2 months ago

Hello,

First thing to check is to upgrade to V17.0.4

LucasRaynaud commented 2 months ago

Hello,

I did the update to 17.0.4 and I still have the error. It comes from the default $sortfield which is set on fd.date, but if I don't select any fields of an intervention line to show in the intervention list then the field doesn't exist in the list and it shows the error.

W1W1-M commented 2 months ago

Hello, You could also try upgrading to v18