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.45k stars 2.79k forks source link

DB_ERROR_NOSUCHFIELD Unknown column 't.label' in 'field list' #22530

Closed Crashone closed 1 year ago

Crashone commented 2 years ago

Bug

When I try to create a new job position in the HRM module, I got a database error :

Modules/Applications: user, takepos, adherent, oauth, ldap, propal, expedition, hrm, contrat, ficheinter, supplier_proposal, reception, incoterm, blockedlog, tax, loan, export, import, workflow, comptabilite, product, prelevement, stock, knowledgemanagement, categorie, agenda, banque, commande, don, ecm, expensereport, facture, fournisseur, holiday, margin, recruitment, resource, salaries, service, societe, ticket Type gestionnaire de base de données: mysqli Requête dernier accès en base en erreur: SELECT t.rowid, t.ref,t.label FROM llx_establishment as t WHERE 1=1 AND t.entity IN (1) ORDER BY t.ref ASC, t.label ASC Code retour dernier accès en base en erreur: DB_ERROR_NOSUCHFIELD Information sur le dernier accès en base en erreur: Unknown column 't.label' in 'field list'

Environment Version

16.0.1

Environment OS

Linux 5.15.0-48-generic #54-Ubuntu SMP

Environment Web server

Apache/2.4.52 (Ubuntu)

Environment PHP

8.1.11

Environment Database

MySQL or MariaDB 10.6.7-MariaDB-2ubuntu1.1

Environment URL(s)

/recruitment/recruitmentjobposition_card.php?action=create&idmenu=11213&mainmenu=hrm&leftmenu=

Expected and actual behavior

No response

Steps to reproduce the behavior

No response

Attached files

No response

ksar-ksar commented 2 years ago

Hello,

It's seems that there is a problem on table creation script. If you create an empty database column, "label" doesn't exist : https://github.com/Dolibarr/dolibarr/blob/16.0/htdocs/install/mysql/tables/llx_establishment.sql But this column has been introduced in V13 : https://github.com/Dolibarr/dolibarr/blob/16.0/htdocs/install/mysql/migration/12.0.0-13.0.0.sql#L86

Crashone commented 2 years ago

Thank you for your reply. For information, my initial installation is V15 so I guess this bug also affects this version.

hregis commented 2 years ago

@Crashone @ksar-ksar it is the "name" field that must be renamed to "label"

hregis commented 2 years ago

fixed with this PR https://github.com/Dolibarr/dolibarr/pull/22538

Hystepik commented 1 year ago

It seems to be fixed so I close the issue. Feel free to reopen if not.