[BUGFIX] Set caption and copyright filemetadata DB columns to TEXT 48/50248/5
authorClaus Due <claus@namelesscoder.net>
Mon, 17 Oct 2016 15:50:17 +0000 (17:50 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 24 Oct 2016 10:34:59 +0000 (12:34 +0200)
This patch changes the SQL field type of two fields on
sys_file_metadata, caption and copyright, to increase
the allowed size of content in the field.

The change is marked as a bug fix since currently, attempting
to save more than the allowed 255 chars truncates every
byte beyond the barrier.

See forge issue for further details about performance
concerns and reasoning behind increasing the size.

Change-Id: I7a407d3ed6eb4bd157330bd57b0093f3f3deb5ca
Resolves: #78149
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/50248
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/filemetadata/Configuration/TCA/Overrides/sys_file_metadata.php
typo3/sysext/filemetadata/ext_tables.sql

index 337fc45..d1e68d9 100644 (file)
@@ -165,9 +165,9 @@ $tca = [
             'l10n_mode' => 'prefixLangTitle',
             'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.caption',
             'config' => [
-                'type' => 'input',
-                'size' => 30,
-                'eval' => 'trim'
+                'type' => 'text',
+                'cols' => 40,
+                'rows' => 3,
             ],
         ],
         'creator_tool' => [
@@ -227,9 +227,9 @@ $tca = [
             'exclude' => true,
             'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.copyright',
             'config' => [
-                'type' => 'input',
-                'size' => 20,
-                'eval' => 'trim'
+                'type' => 'text',
+                'cols' => 40,
+                'rows' => 3,
             ],
         ],
         'location_country' => [
index 25e3a76..b08bfd3 100644 (file)
@@ -5,13 +5,13 @@ CREATE TABLE sys_file_metadata (
        visible int(11) unsigned DEFAULT '1',
        status varchar(24) DEFAULT '',
        keywords text,
-       caption varchar(255) DEFAULT '',
+       caption text,
        creator_tool varchar(255) DEFAULT '',
        download_name varchar(255) DEFAULT '',
        creator varchar(255) DEFAULT '',
        publisher varchar(45) DEFAULT '',
        source varchar(255) DEFAULT '',
-       copyright varchar(255) DEFAULT '',
+       copyright text,
        location_country varchar(45) DEFAULT '',
        location_region varchar(45) DEFAULT '',
        location_city varchar(45) DEFAULT '',