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

REST API List contacts operation returns 503 error #32391

Open
alsoft10 opened this issue Dec 17, 2024 · 1 comment
Open

REST API List contacts operation returns 503 error #32391

alsoft10 opened this issue Dec 17, 2024 · 1 comment
Labels
Bug This is a bug (something does not work as expected)

Comments

@alsoft10
Copy link
Contributor

Bug

List contact returns wrong result while trying to get list of contacts using parameter, category. That is if the category parameter have some value 503 error is returned. Check the screenshots for more details.

This is actually happening due to wrong SQL syntax is generated. Generated SQL, SELECT t.rowid FROM llx_socpeople as t, llx_categorie_contact as c LEFT JOIN llx_socpeople_extrafields as te ON te.fk_object = t.rowid LEFT JOIN llx_societe as s ON t.fk_soc = s.rowid WHERE t.entity IN (1) AND c.fk_categorie = 2 AND c.fk_socpeople = t.rowid ORDER BY t.rowid ASC LIMIT 101.

Error thrown by MySQL server:
#1054 - Unknown column 't.rowid' in 'on clause'

Dolibarr Version

20.0.2

Environment PHP

8.1.25

Environment Database

MariaDB 10.4.32

Steps to reproduce the behavior and expected behavior

  1. Login to Dolibarr and then access Swagger UI.
  2. Now explore the API using a Key.
  3. Go to List contacts operation.

Attached files

error-1
error-2

@alsoft10 alsoft10 added the Bug This is a bug (something does not work as expected) label Dec 17, 2024
@alsoft10 alsoft10 mentioned this issue Dec 17, 2024
@alsoft10
Copy link
Contributor Author

@eldy Check this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

1 participant