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

BUG: Unknown column 't.ref' in 'field list' object link to category for a project #32840

Open
JonBendtsen opened this issue Jan 28, 2025 · 7 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@JonBendtsen
Copy link
Contributor

Bug

I added a complementary attribute to my projects, an link to an object with this definition: Categorie:categories/class/categorie.class.php
Image

And I got this error in the GUI when I tried to modify a project, even before trying to modify this new complementary attribute.
Image

In dolibarr.log I got this error:

2025-01-28 22:24:11 WARNING 10.0.2.100         9354     33 functions::dol_include_once Tried to load unexisting file: /categorie/class/categorie.class.php
2025-01-28 22:24:11 ERR     10.0.2.100         9354     33 DoliDBMysqli::query Exception in query instead of returning an error: Unknown column 't.ref' in 'field list'
2025-01-28 22:24:11 ERR     10.0.2.100         9354     33 DoliDBMysqli::query SQL Error query: SELECT t.rowid, t.ref FROM llx_categorie as t WHERE 1=1 ORDER BY t.ref ASC
2025-01-28 22:24:11 ERR     10.0.2.100         9354     33 DoliDBMysqli::query SQL Error message: DB_ERROR_NOSUCHFIELD Unknown column 't.ref' in 'field list' From /var/www/html/core/class/html.form.class.php:8547.
2025-01-28 22:24:11 ERR     10.0.2.100         9354     33 Error url=/projet/card.php?action=edit&token=****&id=21, query_string=action=edit&token=****&id=21, 

but after doing this command ln -s categories/ categorie the WARNING disappeared. But the error message is still there,

The text of the GUI error message is

This website or feature is currently temporarily not available or failed after a technical error.

This may be due to a maintenance operation. Current status of operation (2025-01-28T23:26:18Z) are on next line...

Dolibarr has detected a technical error. You can read log file or set option $dolibarr_main_prod to '0' in your config file to get more information.

Dolibarr Version

v.20.0.2 docker image

Environment PHP

v.20.0.2 docker image

Environment Database

MariaDB 11.5.2-MariaDB-ubu2404

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

@JonBendtsen JonBendtsen added the Bug This is a bug (something does not work as expected) label Jan 28, 2025
hregis added a commit to hregis/dolibarr that referenced this issue Jan 29, 2025
@hregis
Copy link
Contributor

hregis commented Jan 29, 2025

@JonBendtsen you can test this fix : #32846

@hregis
Copy link
Contributor

hregis commented Jan 29, 2025

@JonBendtsen you can add filter to have just product categories :

Categorie:categories/class/categorie.class.php:0:(t.type:=:0)

@JonBendtsen
Copy link
Contributor Author

@JonBendtsen you can add filter to have just product categories :

Categorie:categories/class/categorie.class.php:0:(t.type:=:0)

this change alone still gives this GUI error

This website or feature is currently temporarily not available or failed after a technical error.

This may be due to a maintenance operation. Current status of operation (2025-01-29T19:08:54Z) are on next line...

Dolibarr has detected a technical error. You can read log file or set option $dolibarr_main_prod to '0' in your config file to get more information.

@JonBendtsen
Copy link
Contributor Author

@JonBendtsen you can test this fix : #32846

Thank you, this seems to work perfectly, I even changed the Complementary Attribute definition back to

Categorie:categories/class/categorie.class.php

and it still works

@JonBendtsen
Copy link
Contributor Author

JonBendtsen commented Jan 29, 2025

If I may move the goal post. Even before the fix you made @hregis I noticed that I could not as expected edit unless I modified the entire project, that is still the case and would probably warrant it's own bug report/(feature request).

product_category definition
Image

View project does not allow edit of product category
Image

modify project allows edit of product_category
Image

@hregis
Copy link
Contributor

hregis commented Jan 29, 2025

@JonBendtsen ok it's fixed : #32846

@JonBendtsen
Copy link
Contributor Author

@hregis many thanks, this works too

Image

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

2 participants