Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when deleting thirdparty/contact when using PostgreSQL after upgrade 19 -> 20 #31352

Open
jturello-ulink opened this issue Oct 10, 2024 · 3 comments
Labels
Bug or PR need more information This bug or PR needs more information (answer to a question or more accurate description)

Comments

@jturello-ulink
Copy link

Bug

Hi,

After upgrading Dolibarr 19 to version 20.0.1, we can't delete contacts anymore. It seems to be related to the SQL query at line 143 in the file societe/contact.php

The clause "DELETE t, et FROM..... LEFT JOIN...." doesn't work with PostgreSQL (maybe MySQL specific?).

Best regards

Dolibarr Version

20.0.1

Environment PHP

7.4

Environment Database

PostgreSQL v13

Steps to reproduce the behavior and expected behavior

Try to delete a thirdparty's contact.

Attached files

No response

@jturello-ulink jturello-ulink added the Bug This is a bug (something does not work as expected) label Oct 10, 2024
@ksar-ksar
Copy link
Contributor

Hello,

Can you give the full SQL command and error message ?

@ksar-ksar ksar-ksar added Bug or PR need more information This bug or PR needs more information (answer to a question or more accurate description) and removed Bug This is a bug (something does not work as expected) labels Oct 11, 2024
@hregis
Copy link
Contributor

hregis commented Oct 11, 2024

@jturello-ulink can you try with this fix : #31360

@jturello-ulink
Copy link
Author

The error message is: ERROR: 42601: syntax error at or near 't' LINE 1: DELETE t, et FROM llx_socpeople AS t LEFT JOIN llx_socpeople... ^ LOCATION: scanner_yyerror, scan.l:1242

I've tried the fix and I can confirm it works! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug or PR need more information This bug or PR needs more information (answer to a question or more accurate description)
Projects
None yet
Development

No branches or pull requests

3 participants