-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix(View): column might be saved as null #1196
Conversation
5101555
to
42697c6
Compare
/backport to stable0.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it does not break everything anymore. But the view still is created. And it doesn't load
Error trace
nextcloud-1 | {"reqId":"vA5U9ylt88n4P6pYlP66","level":3,"time":"2024-07-12T15:35:37+00:00","remoteAddr":"192.168.21.5","user":"admin","app":"tables","method":"GET","url":"/index.php/apps/tables/row/view/5","message":"An exception occurred while executing a query: 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 '))' at line 1","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","version":"30.0.0.1","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: 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 '))' at line 1","Code":1064,"Trace":[{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":55,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::","args":[["Doctrine\\DBAL\\Exception\\SyntaxErrorException"]]},{"file":"/var/www/html/apps/tables/lib/Db/Row2Mapper.php","line":153,"function":"executeQuery","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["SELECT `id` FROM `*PREFIX*tables_row_sleeves` `sleeves` WHERE (`table_id` = :dcValue1) AND (())",[1],[1]]},{"file":"/var/www/html/apps/tables/lib/Db/Row2Mapper.php","line":177,"function":"getWantedRowIds","class":"OCA\\Tables\\Db\\Row2Mapper","type":"->","args":["admin",1,[[[null,null,""]]],null,null]},{"file":"/var/www/html/apps/tables/lib/Service/RowService.php","line":109,"function":"findAll","class":"OCA\\Tables\\Db\\Row2Mapper","type":"->","args":[[["OCA\\Tables\\Db\\Column",1],["OCA\\Tables\\Db\\Column",2],["OCA\\Tables\\Db\\Column",3],["OCA\\Tables\\Db\\Column",4]],[["OCA\\Tables\\Db\\Column",1],["OCA\\Tables\\Db\\Column",2],["OCA\\Tables\\Db\\Column",3],["OCA\\Tables\\Db\\Column",4]],1,null,null,[[[null,null,""]]],[],"admin"]},{"file":"/var/www/html/apps/tables/lib/Controller/RowController.php","line":48,"function":"findAllByView","class":"OCA\\Tables\\Service\\RowService","type":"->","args":[5,"admin"]},{"file":"/var/www/html/apps/tables/lib/Controller/Errors.php","line":16,"function":"OCA\\Tables\\Controller\\{closure}","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/tables/lib/Controller/RowController.php","line":49,"function":"handleError","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"indexView","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[5]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"indexView"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"indexView"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Tables\\Controller\\RowController","indexView",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["5","tables.row.indexview"]]},{"file":"/var/www/html/lib/base.php","line":988,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/tables/row/view/5"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/DB/Exceptions/DbalException.php","Line":54,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\SyntaxErrorException","Message":"An exception occurred while executing a query: 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 '))' at line 1","Code":1064,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1943,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1885,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1106,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],"SELECT `id` FROM `oc_tables_row_sleeves` `sleeves` WHERE (`table_id` = ?) AND (())",[1],[1]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":304,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT `id` FROM `oc_tables_row_sleeves` `sleeves` WHERE (`table_id` = ?) AND (())",[1],[1],null]},{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":52,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT `id` FROM `oc_tables_row_sleeves` `sleeves` WHERE (`table_id` = :dcValue1) AND (())",[1],[1]]},{"file":"/var/www/html/apps/tables/lib/Db/Row2Mapper.php","line":153,"function":"executeQuery","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["SELECT `id` FROM `*PREFIX*tables_row_sleeves` `sleeves` WHERE (`table_id` = :dcValue1) AND (())",[1],[1]]},{"file":"/var/www/html/apps/tables/lib/Db/Row2Mapper.php","line":177,"function":"getWantedRowIds","class":"OCA\\Tables\\Db\\Row2Mapper","type":"->","args":["admin",1,[[[null,null,""]]],null,null]},{"file":"/var/www/html/apps/tables/lib/Service/RowService.php","line":109,"function":"findAll","class":"OCA\\Tables\\Db\\Row2Mapper","type":"->","args":[[["OCA\\Tables\\Db\\Column",1],["OCA\\Tables\\Db\\Column",2],["OCA\\Tables\\Db\\Column",3],["OCA\\Tables\\Db\\Column",4]],[["OCA\\Tables\\Db\\Column",1],["OCA\\Tables\\Db\\Column",2],["OCA\\Tables\\Db\\Column",3],["OCA\\Tables\\Db\\Column",4]],1,null,null,[[[null,null,""]]],[],"admin"]},{"file":"/var/www/html/apps/tables/lib/Controller/RowController.php","line":48,"function":"findAllByView","class":"OCA\\Tables\\Service\\RowService","type":"->","args":[5,"admin"]},{"file":"/var/www/html/apps/tables/lib/Controller/Errors.php","line":16,"function":"OCA\\Tables\\Controller\\{closure}","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/tables/lib/Controller/RowController.php","line":49,"function":"handleError","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"indexView","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[5]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"indexView"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"indexView"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Tables\\Controller\\RowController","indexView",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["5","tables.row.indexview"]]},{"file":"/var/www/html/lib/base.php","line":988,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/tables/row/view/5"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":86,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"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 '))' at line 1","Code":1064,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::","args":[["PDOException",["42000",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 '))' at line 1"]]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1099,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":304,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT `id` FROM `oc_tables_row_sleeves` `sleeves` WHERE (`table_id` = ?) AND (())",[1],[1],null]},{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":52,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT `id` FROM `oc_tables_row_sleeves` `sleeves` WHERE (`table_id` = :dcValue1) AND (())",[1],[1]]},{"file":"/var/www/html/apps/tables/lib/Db/Row2Mapper.php","line":153,"function":"executeQuery","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["SELECT `id` FROM `*PREFIX*tables_row_sleeves` `sleeves` WHERE (`table_id` = :dcValue1) AND (())",[1],[1]]},{"file":"/var/www/html/apps/tables/lib/Db/Row2Mapper.php","line":177,"function":"getWantedRowIds","class":"OCA\\Tables\\Db\\Row2Mapper","type":"->","args":["admin",1,[[[null,null,""]]],null,null]},{"file":"/var/www/html/apps/tables/lib/Service/RowService.php","line":109,"function":"findAll","class":"OCA\\Tables\\Db\\Row2Mapper","type":"->","args":[[["OCA\\Tables\\Db\\Column",1],["OCA\\Tables\\Db\\Column",2],["OCA\\Tables\\Db\\Column",3],["OCA\\Tables\\Db\\Column",4]],[["OCA\\Tables\\Db\\Column",1],["OCA\\Tables\\Db\\Column",2],["OCA\\Tables\\Db\\Column",3],["OCA\\Tables\\Db\\Column",4]],1,null,null,[[[null,null,""]]],[],"admin"]},{"file":"/var/www/html/apps/tables/lib/Controller/RowController.php","line":48,"function":"findAllByView","class":"OCA\\Tables\\Service\\RowService","type":"->","args":[5,"admin"]},{"file":"/var/www/html/apps/tables/lib/Controller/Errors.php","line":16,"function":"OCA\\Tables\\Controller\\{closure}","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/tables/lib/Controller/RowController.php","line":49,"function":"handleError","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"indexView","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[5]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"indexView"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"indexView"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Tables\\Controller\\RowController","indexView",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["5","tables.row.indexview"]]},{"file":"/var/www/html/lib/base.php","line":988,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/tables/row/view/5"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"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 '))' at line 1","Code":"42000","Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->","args":[null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1099,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":304,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT `id` FROM `oc_tables_row_sleeves` `sleeves` WHERE (`table_id` = ?) AND (())",[1],[1],null]},{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":52,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT `id` FROM `oc_tables_row_sleeves` `sleeves` WHERE (`table_id` = :dcValue1) AND (())",[1],[1]]},{"file":"/var/www/html/apps/tables/lib/Db/Row2Mapper.php","line":153,"function":"executeQuery","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["SELECT `id` FROM `*PREFIX*tables_row_sleeves` `sleeves` WHERE (`table_id` = :dcValue1) AND (())",[1],[1]]},{"file":"/var/www/html/apps/tables/lib/Db/Row2Mapper.php","line":177,"function":"getWantedRowIds","class":"OCA\\Tables\\Db\\Row2Mapper","type":"->","args":["admin",1,[[[null,null,""]]],null,null]},{"file":"/var/www/html/apps/tables/lib/Service/RowService.php","line":109,"function":"findAll","class":"OCA\\Tables\\Db\\Row2Mapper","type":"->","args":[[["OCA\\Tables\\Db\\Column",1],["OCA\\Tables\\Db\\Column",2],["OCA\\Tables\\Db\\Column",3],["OCA\\Tables\\Db\\Column",4]],[["OCA\\Tables\\Db\\Column",1],["OCA\\Tables\\Db\\Column",2],["OCA\\Tables\\Db\\Column",3],["OCA\\Tables\\Db\\Column",4]],1,null,null,[[[null,null,""]]],[],"admin"]},{"file":"/var/www/html/apps/tables/lib/Controller/RowController.php","line":48,"function":"findAllByView","class":"OCA\\Tables\\Service\\RowService","type":"->","args":[5,"admin"]},{"file":"/var/www/html/apps/tables/lib/Controller/Errors.php","line":16,"function":"OCA\\Tables\\Controller\\{closure}","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/tables/lib/Controller/RowController.php","line":49,"function":"handleError","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"indexView","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[5]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"indexView"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"indexView"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Tables\\Controller\\RowController","indexView",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["5","tables.row.indexview"]]},{"file":"/var/www/html/lib/base.php","line":988,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/tables/row/view/5"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}}},"message":"An exception occurred while executing a query: 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 '))' at line 1","exception":{},"CustomMessage":"An exception occurred while executing a query: 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 '))' at line 1"}} nextcloud-1 | {"reqId":"vA5U9ylt88n4P6pYlP66","level":2,"time":"2024-07-12T15:35:37+00:00","remoteAddr":"192.168.21.5","user":"admin","app":"tables","method":"GET","url":"/index.php/apps/tables/row/view/5","message":"An internal error or exception occurred: OCA\\Tables\\Db\\Row2Mapper - getWantedRowIds: An exception occurred while executing a query: 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 '))' at line 1","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","version":"30.0.0.1","data":{"app":"tables"}}
@enjeck i see, it is the only filter there |
Maybe we shouldn't create the view at all in such cases |
Generally yes, but also too late, they are already there. So need this anyway. I improve. |
@enjeck please check with latest (fixup) commit. It seems it has the nice benefit that the bad filters will also not be stored anymore. A bit more expensive though, but this is temporarily until we have cleaned up stuff in the DB. |
Works for me! Thanks! |
36beef5
to
8c9b58b
Compare
Thanks! Squashed. |
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8c9b58b
to
841e7a3
Compare
fixes #1188
TODO: in a follow up PR(s): prevent save in frontend, and repair step to clean the database from such entries.