Deck Trello Import cards with long names
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
While importing with occ deck:import --system=TrelloJson --config=cofig.json --data=trello.json it failed to import a Trello card with a very long name
To reproduce this error the trello.json file must contain an action with a "name" with more than 255 characters.
Failed to import card "name with more than 255 characters abcdefghijklmnopqrstuvwxyz....abcdefghijklmnopqrstuvwxyz":An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(255)
Nextcloud version:
27.1.0.
Where did you install Nextcloud from:
all-in-one
Signing status:
No errors have been found.
List of activated apps:
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
Enabled:
- activity: 2.19.0
- admin_audit: 1.17.0
- announcementcenter: 6.6.2
- bookmarks: 13.1.1
- bruteforcesettings: 2.7.0
- calendar: 4.5.0
- circles: 27.0.1
- cloud_federation_api: 1.10.0
- collectives: 2.7.1
- comments: 1.17.0
- contacts: 5.4.0
- contactsinteraction: 1.8.0
- dashboard: 7.7.0
- dav: 1.27.0
- deck: 1.11.0
- drawio: 2.1.2
- external: 5.2.1
- federatedfilesharing: 1.17.0
- federation: 1.17.0
- files: 1.22.0
- files_antivirus: 5.2.2
- files_bpm: 1.2.0
- files_markdown: 2.4.1
- files_mindmap: 0.0.28
- files_pdfviewer: 2.8.0
- files_reminders: 1.0.0
- files_rightclick: 1.6.0
- files_sharing: 1.19.0
- files_trashbin: 1.17.0
- files_versions: 1.20.0
- fileslibreofficeedit: 1.1.0
- firstrunwizard: 2.16.0
- groupfolders: 15.3.0
- logreader: 2.12.0
- lookup_server_connector: 1.15.0
- mail: 3.4.0
- nextcloud-aio: 0.4.0
- nextcloud_announcements: 1.16.0
- notes: 4.8.1
- notifications: 2.15.0
- notify_push: 0.6.3
- oauth2: 1.15.1
- password_policy: 1.17.0
- photos: 2.3.0
- polls: 5.3.2
- privacy: 1.11.0
- provisioning_api: 1.17.0
- quicknotes: 0.8.10
- recommendations: 1.6.0
- related_resources: 1.2.0
- richdocuments: 8.2.0
- serverinfo: 1.17.0
- settings: 1.9.0
- sharebymail: 1.17.0
- socialsharing_email: 2.6.0
- spreed: 17.1.0
- support: 1.10.0
- survey_client: 1.15.0
- suspicious_login: 5.0.0
- systemtags: 1.17.0
- tasks: 0.15.0
- text: 3.8.0
- theming: 2.2.0
- theming_customcss: 1.14.0
- twofactor_backupcodes: 1.16.0
- twofactor_totp: 9.0.0
- user_status: 1.7.0
- viewer: 2.1.0
- weather_status: 1.7.0
- workflowengine: 2.9.0
Disabled:
- dokuwiki: 1.0.1 (installed 1.0.1)
- encryption: 2.15.0
- files_external: 1.19.0
- integration_collaboard: 1.0.6 (installed 1.0.6)
- integration_openproject: 2.4.4 (installed 2.4.4)
- user_ldap: 1.17.0
- xwiki: 0.1.1 (installed 0.1.1)
Nextcloud configuration:
{
"system": {
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"overwritehost": "nextcloud.domain.de",
"overwriteprotocol": "https",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"nextcloud.domain.de"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "27.1.0.7",
"overwrite.cli.url": "https:\/\/nextcloud.domain.de\/",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"check_data_directory_permissions": false,
"maintenance": false,
"loglevel": "2",
"log_type": "file",
"logfile": "\/var\/www\/html\/data\/nextcloud.log",
"log_rotate_size": "10485760",
"log.condition": {
"apps": [
"admin_audit"
]
},
"preview_max_x": "2048",
"preview_max_y": "2048",
"jpeg_quality": "60",
"enabledPreviewProviders": {
"1": "OC\\Preview\\Image",
"2": "OC\\Preview\\MarkDown",
"3": "OC\\Preview\\MP3",
"4": "OC\\Preview\\TXT",
"5": "OC\\Preview\\OpenDocument",
"6": "OC\\Preview\\Movie",
"0": "OC\\Preview\\Imaginary"
},
"enable_previews": true,
"upgrade.disable-web": true,
"mail_smtpmode": "smtp",
"trashbin_retention_obligation": "auto, 30",
"versions_retention_obligation": "auto, 30",
"activity_expire_days": "30",
"simpleSignUpLink.shown": false,
"share_folder": "\/Shared",
"one-click-instance": true,
"one-click-instance.user-limit": 100,
"one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
"updatedirectory": "\/nc-updater",
"htaccess.RewriteBase": "\/",
"files_external_allow_create_new_local": false,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"allow_local_remote_servers": true,
"mail_sendmailmode": "smtp",
"preview_imaginary_url": "http:\/\/nextcloud-aio-imaginary:9000",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"default_phone_region": "\u201cDE\u201d",
"upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
"davstorage.request_timeout": 3600,
"dbpersistent": true,
"mail_smtpstreamoptions": {
"ssl": {
"allow_self_signed": true,
"verify_peer": false,
"verify_peer_name": false
}
}
}
}
Logs
Nextcloud log (data/nextcloud.log)
Browser log
The import failed for one card with a long name with more than 255 characters.
Failed to import card "name with more than 255 characters":An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(255)
As workaround i've added substr in line 277 to avoid problems with too long card names.
$card->setTitle(substr($trelloCard->name, 0, 255));
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the Trello import code around the reported line 277, especially how card names are passed to storage. Reproduce with a Trello JSON action name over 255 characters and verify the importer completes without the reported database error; the issue does not specify whether truncation or longer storage is intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100