Can't save note without a group (PSQL)
Closed this issue · 11 comments
Current master branch.
Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing 'INSERT INTO "oc_ownnote"("name","uid","note","mtime","shared") VALUES(?,?,?,?,?)' with params ["TEST2", "ncadmin", "", 1499644582, false]: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "grouping" violates not-null constraint DETAIL: Failing row contains (5, ncadmin, TEST2, null, f, 1499644582, 0, )./var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128: Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php - line 177: Doctrine\DBAL\DBALException driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOPgSql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'INSERT INTO "oc...', Array)/var/www/nextcloud/lib/public/AppFramework/Db/Mapper.php - line 247: Doctrine\DBAL\Statement->execute()/var/www/nextcloud/lib/public/AppFramework/Db/Mapper.php - line 125: OCP\AppFramework\Db\Mapper->execute('INSERT INTO `*P...', Array)/var/www/nextcloud/apps/nextnote/lib/Db/NextNoteMapper.php - line 125: OCP\AppFramework\Db\Mapper->insert(Object(OCA\NextNote\Db\NextNote))/var/www/nextcloud/apps/nextnote/lib/Service/NextNoteService.php - line 89: OCA\NextNote\Db\NextNoteMapper->create(Object(OCA\NextNote\Db\NextNote))/var/www/nextcloud/apps/nextnote/controller/nextnoteapicontroller.php - line 91: OCA\NextNote\Service\NextNoteService->create(Object(OCA\NextNote\Db\NextNote), 'ncadmin')[internal function] OCA\NextNote\Controller\NextNoteApiController->create('TEST2', NULL, Array)/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array)/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\NextNote\Controller\NextNoteApiController), 'create')/var/www/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\NextNote\Controller\NextNoteApiController), 'create')/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('OCA\\NextNote\\Co...', 'create', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)/var/www/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)/var/www/nextcloud/lib/base.php - line 1000: OC\Route\Router->match('/apps/nextnote/...')/var/www/nextcloud/index.php - line 40: OC handleRequest(){main}
Saving a note with a group directly works.
Same exception for me in MySQL database
@alexisrosano89 Do you have the same exception?
Doesn't happen for my with the current master - would need to dig around more. On my end the grouping that is passed down is an empty string but not NULL. Somehow on your end its NULL and hence the exception. Could try a workaround til we know where this comes from...
@brantje Or if you give me your email I can give you the download link for the PostgreSQL VM.
Join us at telegram 😄
@brantje I'm still in the Gitter group, I don't use Telegram and I rather don't add yet another chat-relay. :)
afaik all communication is happening in Telegram and lots of commits. Project is active, but the Gitter is not.