[BUGFIX] fix missing l18n fields in blog tag table 92/54792/2
authorSebastian Hofer <sebastian.hofer@marit.ag>
Mon, 27 Nov 2017 11:47:11 +0000 (12:47 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 27 Nov 2017 16:03:29 +0000 (17:03 +0100)
The field l18n_parent was missing in table
tx_blogexample_domain_model_tag, but configured in TCA.
This causes an exception with adding a new tag in BE.
Also the field l18n_diffsource was missing in TCA and database.

* Add the fields l18n_parent and l18_diffsource to
  the databse table tx_blogexample_domain_model_tag
* Add TCA configuration for field l18n_diffsource to
  tx_blogexample_domain_model_tag TCA

Also add missing icon and label for
tx_blogexample_domain_model_dateexample.

Remove "allow tables on standard pages". This is not
necessary.

Fixes: #83113
Releases: master, 8.7
Change-Id: I10f809cc4b00df07c6e5a064bb89018578f3abf3
Reviewed-on: https://review.typo3.org/54792
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_tag.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Resources/Private/Language/locallang_db.xml
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_dateexample.gif [new file with mode: 0644]
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.sql

index 3d57b5c..7840174 100644 (file)
@@ -45,6 +45,12 @@ return [
                 'foreign_table_where' => 'AND tx_blogexample_domain_model_tag.uid=###REC_FIELD_l18n_parent### AND tx_blogexample_domain_model_tag.sys_language_uid IN (-1,0)',
             ]
         ],
+        'l18n_diffsource' => [
+            'config'=>[
+                'type' => 'passthrough',
+                'default' => '',
+            ],
+        ],
         'hidden' => [
             'exclude' => true,
             'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.hidden',
index f2be394..feeef2e 100644 (file)
@@ -39,6 +39,7 @@
                        <label index="tx_blogexample_domain_model_tag">Tag</label>
                        <label index="tx_blogexample_domain_model_tag.name">Name</label>
                        <label index="tx_blogexample_domain_model_tag.posts">Related posts</label>
+                       <label index="tx_blogexample_domain_model_dateexample">Date example</label>
                        <label index="fe_users.tx_extbase_type.Tx_BlogExample_Domain_Model_Administrator">Blog Admin (BlogExample)</label>
                </languageKey>
        </data>
diff --git a/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_dateexample.gif b/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_dateexample.gif
new file mode 100644 (file)
index 0000000..a8af198
Binary files /dev/null and b/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_dateexample.gif differ
index 7ae11b2..692de2a 100644 (file)
@@ -11,10 +11,6 @@ defined('TYPO3_MODE') or die();
 
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Blogs', 'Blog listing');
 
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages(
-    'tx_blogexample_domain_model_blog,tx_blogexample_domain_model_post,tx_blogexample_domain_model_comment,tx_blogexample_domain_model_person,tx_blogexample_domain_model_tag'
-);
-
 // Categorize Blog,Post records
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable($_EXTKEY, 'tx_blogexample_domain_model_blog');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable($_EXTKEY, 'tx_blogexample_domain_model_post');
index 1db0eac..e04333a 100644 (file)
@@ -155,6 +155,8 @@ CREATE TABLE tx_blogexample_domain_model_tag (
        hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
 
        sys_language_uid int(11) DEFAULT '0' NOT NULL,
+       l18n_parent int(11) DEFAULT '0' NOT NULL,
+       l18n_diffsource mediumblob,
 
        PRIMARY KEY (uid),
        KEY parent (pid)