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

fix: Properly insert rows into views for the new db structure #811

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Jan 30, 2024

As seen in our call ;)

Steps to reproduce:

  • Create a view with some filter

  • Try to add a new row

  • Test case added for now as a simplified copy of the other view tests, we should make this more reusable mid term and also use api calls or preseed structures instead of clicking through every time i think

Error traces:
{"reqId":"n44vxSJOKGrhjaAQmRnk","level":3,"time":"2024-01-30T09:41:00+00:00","remoteAddr":"192.168.65.1","user":"alice","app":"index","method":"POST","url":"/index.php/apps/tables/row","message":"OCA\\Tables\\Db\\Row2::setTableId(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 199 in file '/var/www/html/apps-shared/tables/lib/Db/Row2.php' line 33","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0","version":"29.0.0.4","exception":{"Exception":"Exception","Message":"OCA\\Tables\\Db\\Row2::setTableId(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 199 in file '/var/www/html/apps-shared/tables/lib/Db/Row2.php' line 33","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"create"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Tables\\Controller\\RowController","create",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["tables.row.create"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/tables/row"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":170,"Previous":{"Exception":"TypeError","Message":"OCA\\Tables\\Db\\Row2::setTableId(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 199","Code":0,"Trace":[{"file":"/var/www/html/apps-shared/tables/lib/Service/RowService.php","line":199,"function":"setTableId","class":"OCA\\Tables\\Db\\Row2","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps-shared/tables/lib/Controller/RowController.php","line":71,"function":"create","class":"OCA\\Tables\\Service\\RowService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps-shared/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-shared/tables/lib/Controller/RowController.php","line":74,"function":"handleError","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"create","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"create"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"create"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Tables\\Controller\\RowController","create",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["tables.row.create"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/tables/row"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps-shared/tables/lib/Db/Row2.php","Line":33},"message":"OCA\\Tables\\Db\\Row2::setTableId(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 199 in file '/var/www/html/apps-shared/tables/lib/Db/Row2.php' line 33","exception":{},"CustomMessage":"OCA\\Tables\\Db\\Row2::setTableId(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 199 in file '/var/www/html/apps-shared/tables/lib/Db/Row2.php' line 33"}}
{"reqId":"NK5P4IUONllaPqifOJRm","level":3,"time":"2024-01-30T09:42:52+00:00","remoteAddr":"192.168.65.1","user":"alice","app":"index","method":"POST","url":"/index.php/apps/tables/row","message":"OCA\\Tables\\Db\\ColumnMapper::findAllByTable(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 202 in file '/var/www/html/apps-shared/tables/lib/Db/ColumnMapper.php' line 72","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0","version":"29.0.0.4","exception":{"Exception":"Exception","Message":"OCA\\Tables\\Db\\ColumnMapper::findAllByTable(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 202 in file '/var/www/html/apps-shared/tables/lib/Db/ColumnMapper.php' line 72","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"create"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Tables\\Controller\\RowController","create",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["tables.row.create"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/tables/row"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":170,"Previous":{"Exception":"TypeError","Message":"OCA\\Tables\\Db\\ColumnMapper::findAllByTable(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 202","Code":0,"Trace":[{"file":"/var/www/html/apps-shared/tables/lib/Service/RowService.php","line":202,"function":"findAllByTable","class":"OCA\\Tables\\Db\\ColumnMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps-shared/tables/lib/Controller/RowController.php","line":71,"function":"create","class":"OCA\\Tables\\Service\\RowService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps-shared/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-shared/tables/lib/Controller/RowController.php","line":74,"function":"handleError","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"create","class":"OCA\\Tables\\Controller\\RowController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"create"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Tables\\Controller\\RowController"],"create"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Tables\\Controller\\RowController","create",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["tables.row.create"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/tables/row"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps-shared/tables/lib/Db/ColumnMapper.php","Line":72},"message":"OCA\\Tables\\Db\\ColumnMapper::findAllByTable(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 202 in file '/var/www/html/apps-shared/tables/lib/Db/ColumnMapper.php' line 72","exception":{},"CustomMessage":"OCA\\Tables\\Db\\ColumnMapper::findAllByTable(): Argument #1 ($tableId) must be of type int, null given, called in /var/www/html/apps-shared/tables/lib/Service/RowService.php on line 202 in file '/var/www/html/apps-shared/tables/lib/Db/ColumnMapper.php' line 72"}}

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr added bug Something isn't working 3. to review Waiting for reviews labels Feb 1, 2024
Copy link
Contributor

@enjeck enjeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@juliusknorr juliusknorr merged commit 9f56adb into main Feb 2, 2024
46 checks passed
@juliusknorr juliusknorr deleted the bugfix/noid/view-create branch February 2, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants