Issue Bug Rejected

#79952Backend User Module throws Exception when searching for users

Tizian Schmidlin 02/22/17, 10:07 updated 05/12/17, 21:24

Description

Hello there,

as I explained in the Slack-Channel, I’ve found the following issue:

  • Updated TYPO3 6.2 to 7.6
  • Backend User module throws an error on “#1247602160: Unknown column ‘user_name’ in ‘order clause’ “

This happens because there is no mapping for the BackendUser Model field $userName to actual field username and since this mapping doesn’t exist, extbase will simply try to convert userName to user_name and therefore fails the SQL query.

I’ve tried adding the mapping for this field as follows but it didn’t seem to fix anything:

// 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
                # This line below is new
                username.mapOnProperty = userName
            }
        }
    }
    TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup {
        mapping {
            tableName = be_groups
            columns {
                subgroup.mapOnProperty = subGroups
            }
        }
    }
}

Regards
Tizian

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.