Skip to content

error while creating card with content length greater than 100 #1923

@js-d-coder

Description

@js-d-coder

Steps to reproduce

  1. create new card with string length greater than 100
  2. notice the error

Expected behaviour

  1. create new card with string length greater than 100
  2. card is created successfully

Actual behaviour

  1. create new card with string length greater than 100
  2. card not created with following error
Could not create card: An exception occurred while executing 'INSERT INTO "oc_deck_cards"("title","stack_id","type","order","owner","description","created_at","last_modified") VALUES(?,?,?,?,?,?,?,?)' with params ["https:\/\/sqs.${process.env.region}.amazonaws.com\/${process.env.accountId}\/${process.env.stage}-tqmi-forms-sqs-queue", 80, "plain", 999, "jibran", "", 1589866142, 1589866142]: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(100)

Server configuration detail

Operating system: Linux 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l

Webserver: nginx/1.14.2 (fpm-fcgi)

Database: pgsql PostgreSQL 11.7 (Raspbian 11.7-0+deb10u1) on arm-unknown-linux-gnueabihf, compiled by gcc (Raspbian 8.3.0-6+rpi1) 8.3.0, 32-bit

PHP version:

7.3.14-1~deb10u1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, sodium, standard, cgi-fcgi, mysqlnd, PDO, xml, amqp, apcu, bcmath, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, json, exif, msgpack, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, redis, shmop, SimpleXML, sockets, tidy, tokenizer, xmlreader, xmlrpc, xmlwriter, zip, memcached, Zend OPcache

Nextcloud version: 18.0.3 - 18.0.3.0

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.4.0
 - admin_audit: 1.8.0
 - bookmarks: 3.0.13
 - bruteforcesettings: 1.6.0
 - calendar: 2.0.3
 - cloud_federation_api: 1.1.0
 - contacts: 3.3.0
 - dav: 1.14.0
 - deck: 1.0.1
 - federatedfilesharing: 1.8.0
 - files: 1.13.1
 - files_markdown: 2.2.0
 - files_pdfviewer: 1.7.0
 - files_rightclick: 0.15.2
 - files_trashbin: 1.8.0
 - firstrunwizard: 2.7.0
 - issuetemplate: 0.6.0
 - logreader: 2.3.0
 - lookup_server_connector: 1.6.0
 - metadata: 0.11.1
 - nextcloud_announcements: 1.7.0
 - notes: 3.3.1
 - notifications: 2.6.0
 - oauth2: 1.6.0
 - password_policy: 1.8.0
 - photos: 1.0.0
 - privacy: 1.2.0
 - provisioning_api: 1.8.0
 - serverinfo: 1.8.0
 - settings: 1.0.0
 - survey_client: 1.6.0
 - text: 2.0.0
 - theming: 1.9.0
 - twofactor_backupcodes: 1.7.0
 - updatenotification: 1.8.0
 - viewer: 1.2.0
 - workflowengine: 2.0.0
Disabled:
 - activity
 - comments
 - deck.old
 - encryption
 - federation
 - files_external
 - files_mindmap
 - files_sharing
 - files_versions
 - files_videoplayer
 - gallery
 - quota_warning
 - recommendations
 - sharebymail
 - support
 - systemtags
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "raspberry",
        "192.168.*.*"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "pgsql",
    "version": "18.0.3.0",
    "overwrite.cli.url": "https:\/\/raspberry\/nextcloud",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "5432",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "maintenance": false,
    "theme": "",
    "loglevel": 0,
    "log_type": "file",
    "logfile": "\/var\/www\/nextcloud-data\/nextcloud.log",
    "logfilemode": 416,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "updater.release.channel": "stable",
    "filelocking.enabled": "true",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379
    },
    "has_rebuilt_cache": true
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption:

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4086.0 Safari/537.36

Operating system: Manjaro Linux

Logs

Web server error log
2020/05/16 04:11:55 [error] 355#355: *2647 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.43.2, server: , request: "GET /nextcloud/ocs/v2.php/apps/deck/api/v1.0/cards/180/comments? HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "raspberry"

Nextcloud log
[deck] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO "oc_deck_cards"("title","stack_id","type","order","owner","description","created_at","last_modified") VALUES(?,?,?,?,?,?,?,?)' with params ["the 30 years war, the treaty of westphalia (and the wars that lead to it), the napoleonic wars, and WW1.", 80, "plain", 999, "<username masked>", "", 1589787260, 1589787260]:

SQLSTATE[22001]: String data, right truncated: 7 ERROR:  value too long for type character varying(100) at <<closure>>
 0. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException("An exception oc ... )", Doctrine\DBAL\Dr ... ]})
 1. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOPgSql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... )")
 2. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php line 162
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOPgSql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO \"o ... )", {1: "the 30 year ... 0})
 3. /var/www/html/nextcloud/lib/public/AppFramework/Db/Mapper.php line 255
    Doctrine\DBAL\Statement->execute()
 4. /var/www/html/nextcloud/apps/deck/lib/Db/DeckMapper.php line 49
    OCP\AppFramework\Db\Mapper->execute("INSERT INTO `*P ... )", ["the 30 years w ... 0], null, null)
 5. /var/www/html/nextcloud/lib/public/AppFramework/Db/Mapper.php line 129
    OCA\Deck\Db\DeckMapper->execute("INSERT INTO `*P ... )", ["the 30 years w ... 0])
 6. /var/www/html/nextcloud/apps/deck/lib/Db/CardMapper.php line 66
    OCP\AppFramework\Db\Mapper->insert(OCA\Deck\Db\Card {id: null})
 7. /var/www/html/nextcloud/apps/deck/lib/Service/CardService.php line 189
    OCA\Deck\Db\CardMapper->insert(OCA\Deck\Db\Card {id: null})
 8. /var/www/html/nextcloud/apps/deck/lib/Controller/CardController.php line 82
    OCA\Deck\Service\CardService->create("the 30 years wa ... .", 80, "plain", 999, "<username masked>")
 9. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Deck\Controller\CardController->create("the 30 years wa ... .", 80, "plain", 999)
10. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Deck\Controller\CardController {}, "create")
11. /var/www/html/nextcloud/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Deck\Controller\CardController {}, "create")
12. /var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Deck\\Controller\\CardController", "create", OC\AppFramework\ ... {}, {_route: "deck.card.create"})
13. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "deck.card.create"})
14. /var/www/html/nextcloud/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {_route: "deck.card.create"})
15. /var/www/html/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/deck/cards")
16. /var/www/html/nextcloud/index.php line 38
    OC::handleRequest()

POST /nextcloud/apps/deck/cards
from 192.168.43.5 by <username masked> at 2020-05-18T07:34:20+00:00
Browser log

no error log in browser

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions