[BUGFIX] Move beuser property mappings to global scope 05/24005/2
authorPhilipp Gampe <philipp.gampe@typo3.org>
Mon, 23 Sep 2013 10:00:55 +0000 (12:00 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 14 Nov 2013 17:39:58 +0000 (18:39 +0100)
Currently the persistence settings for all tx_beuser models are defined
in module.tx_beuser.persistence.classes.
If any other module tries to access the corresponding backend user
repository from tx_beuser, then no mappings will be loaded by extbase,
resulting in a wrong cache entry for the model and the attempt to
access a nonexisting table.

Move the class mapping part of the TS template into
  config.tx_extbase.persistence.classes
to make them available for all extensions and modules.

Resolves: #51234
Releases: 6.2, 6.1, 6.0
Change-Id: I0b39c96c9db89c379e5613231a215f27b2dfbcde
Reviewed-on: https://review.typo3.org/24005
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/beuser/Configuration/TypoScript/setup.txt

index 9c83d1e..6dfe2b7 100644 (file)
@@ -1,29 +1,30 @@
-module.tx_beuser {
-       persistence {
-               storagePid = 0
-
-               classes {
-                       TYPO3\CMS\Beuser\Domain\Model\BackendUser {
-                               mapping {
-                                       tableName = be_users
-                                       columns {
-                                               allowed_languages.mapOnProperty = allowedLanguages
-                                               file_mountpoints.mapOnProperty = fileMountPoints
-                                               db_mountpoints.mapOnProperty = dbMountPoints
-                                               usergroup.mapOnProperty = backendUserGroups
-                                       }
-                               }
+// Model/table mapping
+config.tx_extbase.persistence.classes {
+       TYPO3\CMS\Beuser\Domain\Model\BackendUser {
+               mapping {
+                       tableName = be_users
+                       columns {
+                               allowed_languages.mapOnProperty = allowedLanguages
+                               file_mountpoints.mapOnProperty = fileMountPoints
+                               db_mountpoints.mapOnProperty = dbMountPoints
+                               usergroup.mapOnProperty = backendUserGroups
                        }
-                       TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup {
-                               mapping {
-                                       tableName = be_groups
-                                       columns {
-                                               subgroup.mapOnProperty = subGroups
-                                       }
-                               }
+               }
+       }
+       TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup {
+               mapping {
+                       tableName = be_groups
+                       columns {
+                               subgroup.mapOnProperty = subGroups
                        }
                }
        }
+}
+
+module.tx_beuser {
+       persistence {
+               storagePid = 0
+       }
 
        settings {
                        // This is a dummy entry. It is used in  Tx_Beuser_Controller_BackendUserController