Part-DB-server icon indicating copy to clipboard operation
Part-DB-server copied to clipboard

Internal error 500 when sorting on Storage locations column

Open crazyelectron-io opened this issue 1 year ago • 2 comments

Describe the bug When clicking on the 'Storage locations' column header to sort on location, an internal error 500 is shown: Error calling [/en/store_location/222/parts](https://parts.MYDOMAIN.TLD/en/store_location/222/parts). When opening the details it also shows Infos for Admin: Error while executing database query. Other columns I checked work fine.

To Reproduce Steps to reproduce the behavior:

  1. Open a list of parts
  2. Click on 'Storage locations' table header
  3. See error

Expected behavior The storage location column sorted alphabetical.

Server Side

  • Part-DB Version: 1.14.0
  • Official Docker image on Debian Linux
  • Database Server Postgres 16.4

Desktop (please complete the following information):

  • OS: MacOS 15
  • Browser Chrome
  • Version 129.0.6668.100

Rerunning the migration or clearing the cache makes no difference.

crazyelectron-io avatar Oct 16 '24 19:10 crazyelectron-io

What does the server log say?

jbtronics avatar Oct 16 '24 21:10 jbtronics

Sorry, I thought I added a log extract. This is logged:

10.42.3.129 - - [17/Oct/2024:05:08:10 +0000] "POST /en/store_location/227/parts HTTP/1.1" 200 33378 "https://parts.EXAMPLE.TLD/en/store_location/227/parts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
{"message":"Matched route \"part_list_store_location\".","context":{"route":"part_list_store_location","route_parameters":{"_route":"part_list_store_location","_controller":"App\\Controller\\PartListsController::showStorelocation","_locale":"en","id":"227"},"request_uri":"https://parts.EXAMPLE.TLD/en/store_location/227/parts","method":"POST"},"level":200,"level_name":"INFO","channel":"request","datetime":"2024-10-17T05:08:13.191754+00:00","extra":{"token":null,"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Read existing security token from the session.","context":{"key":"_security_main","token_class":"Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.192703+00:00","extra":{"token":null,"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"User was reloaded from a user provider.","context":{"provider":"Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider","username":"admin"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204900+00:00","extra":{"token":null,"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Checking for authenticator support.","context":{"firewall_name":"main","authenticators":5},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204919+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Checking support on authenticator.","context":{"firewall_name":"main","authenticator":"App\\Security\\ApiTokenAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204929+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Authenticator does not support the request.","context":{"firewall_name":"main","authenticator":"App\\Security\\ApiTokenAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204937+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Checking support on authenticator.","context":{"firewall_name":"main","authenticator":"Scheb\\TwoFactorBundle\\Security\\Http\\Authenticator\\TwoFactorAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204940+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Authenticator does not support the request.","context":{"firewall_name":"main","authenticator":"Scheb\\TwoFactorBundle\\Security\\Http\\Authenticator\\TwoFactorAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204947+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Checking support on authenticator.","context":{"firewall_name":"main","authenticator":"Nbgrp\\OneloginSamlBundle\\Security\\Http\\Authenticator\\SamlAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204949+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Authenticator does not support the request.","context":{"firewall_name":"main","authenticator":"Nbgrp\\OneloginSamlBundle\\Security\\Http\\Authenticator\\SamlAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204953+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Checking support on authenticator.","context":{"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Http\\Authenticator\\FormLoginAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204956+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Authenticator does not support the request.","context":{"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Http\\Authenticator\\FormLoginAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204960+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Checking support on authenticator.","context":{"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Http\\Authenticator\\RememberMeAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204963+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Authenticator does not support the request.","context":{"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Http\\Authenticator\\RememberMeAuthenticator"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.204966+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"User Deprecated: Since web-auth/webauthn-symfony-bundle 4.9.0: The \"Webauthn\\AttestationStatement\\AndroidSafetyNetAttestationStatementSupport\" service is deprecated and will be removed in version 5.0.0. Android SafetyNet is now deprecated.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since web-auth/webauthn-symfony-bundle 4.9.0: The \"Webauthn\\AttestationStatement\\AndroidSafetyNetAttestationStatementSupport\" service is deprecated and will be removed in version 5.0.0. Android SafetyNet is now deprecated.","code":0,"file":"/var/www/html/var/cache/docker/ContainerUNqxRYS/getAndroidSafetyNetAttestationStatementSupportService.php:23","trace":["/var/www/html/var/cache/docker/ContainerUNqxRYS/App_KernelDockerContainer.php:197","/var/www/html/var/cache/docker/ContainerUNqxRYS/App_KernelDockerContainer.php:927","/var/www/html/var/cache/docker/ContainerUNqxRYS/App_KernelDockerContainer.php:2502","/var/www/html/var/cache/docker/ContainerUNqxRYS/App_KernelDockerContain
er.php:1236","/var/www/html/var/cache/docker/ContainerUNqxRYS/App_KernelDockerContainer.php:388","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:257","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:220","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:56","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:157","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:76","/var/www/html/vendor/symfony/http-kernel/Kernel.php:197","/var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35","/var/www/html/vendor/autoload_runtime.php:29","/var/www/html/public/index.php:5"]}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2024-10-17T05:08:13.205079+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}
}
{"message":"Uncaught PHP Exception Doctrine\\DBAL\\Exception\\DriverException: \"An exception occurred while executing a query: SQLSTATE[42803]: Grouping error: 7 ERROR:  column \"s2_.name\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: ...er_orderdetails_id, p0_.built_project_id ORDER BY s2_.name C...\n                                                             ^\" at ExceptionConverter.php line 80","context":{"exception":{"class":"Doctrine\\DBAL\\Exception\\DriverException","message":"An exception occurred while executing a query: SQLSTATE[42803]: Grouping error: 7 ERROR:  column \"s2_.name\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: ...er_orderdetails_id, p0_.built_project_id ORDER BY s2_.name C...\n                                                             ^","code":7,"file":"/var/www/html/vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php:80","trace":["/var/www/html/vendor/doctrine/dbal/src/Connection.php:1366"
,"/var/www/html/vendor/doctrine/dbal/src/Connection.php:1308","/var/www/html/vendor/doctrine/dbal/src/Connection.php:779","/var/www/html/vendor/doctrine/orm/src/Query/Exec/SingleSelectExecutor.php:29","/var/www/html/vendor/doctrine/orm/src/Query.php:284","/var/www/html/vendor/doctrine/orm/src/AbstractQuery.php:935","/var/www/html/vendor/doctrine/orm/src/AbstractQuery.php:891","/var/www/html/vendor/doctrine/orm/src/AbstractQuery.php:701","/var/www/html/src/DataTables/Adapters/TwoStepORMAdapter.php:184","/var/www/html/vendor/omines/datatables-bundle/src/Adapter/AbstractAdapter.php:44","/var/www/html/vendor/omines/datatables-bundle/src/DataTable.php:317","/var/www/html/vendor/omines/datatables-bundle/src/DataTable.php:276","/var/www/html/src/Controller/PartListsController.php:140","/var/www/html/src/Controller/PartListsController.php:220","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:181","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:76","/var/www/html/vendor/symfony/http-kernel/Kernel.php
:197","/var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35","/var/www/html/vendor/autoload_runtime.php:29","/var/www/html/public/index.php:5"],"previous":{"class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","message":"SQLSTATE[42803]: Grouping error: 7 ERROR:  column \"s2_.name\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: ...er_orderdetails_id, p0_.built_project_id ORDER BY s2_.name C...\n                                                             ^","code":7,"file":"/var/www/html/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28","trace":["/var/www/html/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:57","/var/www/html/vendor/doctrine/dbal/src/Connection.php:772","/var/www/html/vendor/doctrine/orm/src/Query/Exec/SingleSelectExecutor.php:29","/var/www/html/vendor/doctrine/orm/src/Query.php:284","/var/www/html/vendor/doctrine/orm/src/AbstractQuery.php:935","/var/www/html/vendor/doctrine/orm/src/AbstractQuery.php:891","/var/www/html/vendor/doctrin
e/orm/src/AbstractQuery.php:701","/var/www/html/src/DataTables/Adapters/TwoStepORMAdapter.php:184","/var/www/html/vendor/omines/datatables-bundle/src/Adapter/AbstractAdapter.php:44","/var/www/html/vendor/omines/datatables-bundle/src/DataTable.php:317","/var/www/html/vendor/omines/datatables-bundle/src/DataTable.php:276","/var/www/html/src/Controller/PartListsController.php:140","/var/www/html/src/Controller/PartListsController.php:220","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:181","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:76","/var/www/html/vendor/symfony/http-kernel/Kernel.php:197","/var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35","/var/www/html/vendor/autoload_runtime.php:29","/var/www/html/public/index.php:5"],"previous":{"class":"PDOException","message":"SQLSTATE[42803]: Grouping error: 7 ERROR:  column \"s2_.name\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: ...er_orderdetails_id, p0_.built_project_id ORDER BY
 s2_.name C...\n                                                             ^","code":42803,"file":"/var/www/html/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:55","trace":["/var/www/html/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:55","/var/www/html/vendor/doctrine/dbal/src/Connection.php:772","/var/www/html/vendor/doctrine/orm/src/Query/Exec/SingleSelectExecutor.php:29","/var/www/html/vendor/doctrine/orm/src/Query.php:284","/var/www/html/vendor/doctrine/orm/src/AbstractQuery.php:935","/var/www/html/vendor/doctrine/orm/src/AbstractQuery.php:891","/var/www/html/vendor/doctrine/orm/src/AbstractQuery.php:701","/var/www/html/src/DataTables/Adapters/TwoStepORMAdapter.php:184","/var/www/html/vendor/omines/datatables-bundle/src/Adapter/AbstractAdapter.php:44","/var/www/html/vendor/omines/datatables-bundle/src/DataTable.php:317","/var/www/html/vendor/omines/datatables-bundle/src/DataTable.php:276","/var/www/html/src/Controller/PartListsController.php:140","/var/www/html/src/Controller/PartListsController
.php:220","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:181","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:76","/var/www/html/vendor/symfony/http-kernel/Kernel.php:197","/var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35","/var/www/html/vendor/autoload_runtime.php:29","/var/www/html/public/index.php:5"]}}}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2024-10-17T05:08:13.218100+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"User Deprecated: Since nelmio/security-bundle 3.4.0: The \"Nelmio\\SecurityBundle\\EventListener\\XssProtectionListener\" class is deprecated, use Content Security Policy without allowing \"unsafe-inline\" scripts instead.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since nelmio/security-bundle 3.4.0: The \"Nelmio\\SecurityBundle\\EventListener\\XssProtectionListener\" class is deprecated, use Content Security Policy without allowing \"unsafe-inline\" scripts instead.","code":0,"file":"/var/www/html/vendor/nelmio/security-bundle/src/EventListener/XssProtectionListener.php:35","trace":["/var/www/html/vendor/nelmio/security-bundle/src/EventListener/XssProtectionListener.php:80","/var/www/html/var/cache/docker/ContainerUNqxRYS/App_KernelDockerContainer.php:2021","/var/www/html/var/cache/docker/ContainerUNqxRYS/App_KernelDockerContainer.php:470","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:257","/var/www/html/vendor/symfony/event-dispatcher/Even
tDispatcher.php:220","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:56","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:214","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:202","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:76","/var/www/html/vendor/symfony/http-kernel/EventListener/ErrorListener.php:117","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:260","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:220","/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:56","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:239","/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:91","/var/www/html/vendor/symfony/http-kernel/Kernel.php:197","/var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35","/var/www/html/vendor/autoload_runtime.php:29","/var/www/html/public/index.php:5"]}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2024-10-17T05:08:13.219106+00:00","extra
":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
{"message":"Stored the security token in the session.","context":{"key":"_security_main"},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-10-17T05:08:13.219457+00:00","extra":{"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"},"url":"/en/store_location/227/parts","ip":"10.42.2.0","http_method":"POST","server":"parts.EXAMPLE.TLD","referrer":"https://parts.EXAMPLE.TLD/en/store_location/227/parts"}}
10.42.3.129 - - [17/Oct/2024:05:08:13 +0000] "POST /en/store_location/227/parts HTTP/1.1" 500 4576 "https://parts.EXAMPLE.TLD/en/store_location/227/parts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
- -  17/Oct/2024:05:08:13 +0000 "POST /index.php" 500

crazyelectron-io avatar Oct 17 '24 05:10 crazyelectron-io

Should be fixed now

jbtronics avatar Nov 04 '24 22:11 jbtronics