mitchray / ample

A simple web browser client for Ampache
https://ample-player.vercel.app/
GNU Affero General Public License v3.0
61 stars 13 forks source link

Random Artists is blank when running against ampache-dev #36

Closed SimonHova closed 2 years ago

SimonHova commented 2 years ago

When trying to fetch random artists, I get a blank screen and the log files log an SQL error. Random albums and recent artists work fine.

2022-09-13T13:46:07-04:00 [ampache] (Ampache\Module\Api\Authentication\Gatekeeper) -> API session [3866b27fbfa5794ccc1f0929cf46c2e6]
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\Api\ApiHandler) -> API function [Ampache\Module\Api\Method\AdvancedSearchMethod]
2022-09-13T13:46:07-04:00 [ampache] (log.lib) -> [Runtime Error] Undefined array key 0 in file /opt/ampache/src/Repository/Model/Search.php(1520)
2022-09-13T13:46:07-04:00 [ampache] (log.lib) -> [Runtime Error] Trying to access array offset on value of type null in file /opt/ampache/src/Repository/Model/Search.php(1520)
2022-09-13T13:46:07-04:00 [ampache] (log.lib) -> [Runtime Error] Trying to access array offset on value of type null in file /opt/ampache/src/Repository/Model/Search.php(1520)
2022-09-13T13:46:07-04:00 [ampache] (log.lib) -> [Runtime Error] Undefined array key "base" in file /opt/ampache/src/Repository/Model/Search.php(1134)
2022-09-13T13:46:07-04:00 [ampache] (log.lib) -> [Runtime Error] Undefined array key "table_sql" in file /opt/ampache/src/Repository/Model/Search.php(1134)
2022-09-13T13:46:07-04:00 [ampache] (log.lib) -> [Runtime Error] Undefined array key "parameters" in file /opt/ampache/src/Repository/Model/Search.php(1149)
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\System\Dba) -> Error_query SQL: ORDER BY RAND()  LIMIT 18 null
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\System\Dba) -> Error_query MSG: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY RAND()  LIMIT 18' at line 1
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\System\Dba) -> Error_query SQL: ORDER BY RAND()  LIMIT 18 null
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\System\Dba) -> Error_query MSG: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY RAND()  LIMIT 18' at line 1
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\System\Dba) -> Error_query SQL: ORDER BY RAND()  LIMIT 18 null
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\System\Dba) -> Error_query MSG: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY RAND()  LIMIT 18' at line 1
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\System\Dba) -> Error_query SQL: ORDER BY RAND()  LIMIT 18 null
2022-09-13T13:46:07-04:00 [simon] (Ampache\Module\System\Dba) -> Error_query MSG: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY RAND()  LIMIT 18' at line 1
mitchray commented 2 years ago

Fixed with 450cb519f68d687b2f45b4e7be9ea6583b6a2bc7