Project

General

Profile

Actions

Bug #87055

closed

fe_users table sets "identifier" as primary key, instead of "uid"

Added by Armin Vieweg almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-12-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This is what my TYPO3 want to create in Database Compare:

CREATE TABLE fe_users 
             ( 
                          `identifier` varchar(85) DEFAULT '' NOT NULL, 
                          pid          int unsigned DEFAULT 0 NOT NULL, 
                          `tstamp`     int unsigned DEFAULT 0 NOT NULL, 
                          `cruser_id`  int unsigned DEFAULT 0 NOT NULL, 
                          `deleted`    smallint unsigned DEFAULT 0 NOT NULL, 
                          `disable`    smallint unsigned DEFAULT 0 NOT NULL, 
                          `starttime`  int unsigned DEFAULT 0 NOT NULL, 
                          `endtime`    int unsigned DEFAULT 0 NOT NULL, 
                          `description` text DEFAULT NULL, 
                          `tx_extbase_type` varchar(255) DEFAULT '0' NOT NULL, 
                          `username`        varchar(255) DEFAULT '' NOT NULL, 
                          `password`        varchar(100) DEFAULT '' NOT NULL, 
                          `usergroup` tinytext DEFAULT NULL, 
                          `NAME`         varchar(160) DEFAULT '' NOT NULL, 
                          `first_name`   varchar(50) DEFAULT '' NOT NULL, 
                          `middle_name`  varchar(50) DEFAULT '' NOT NULL, 
                          `last_name`    varchar(50) DEFAULT '' NOT NULL, 
                          `address`      varchar(255) DEFAULT '' NOT NULL, 
                          `telephone`    varchar(30) DEFAULT '' NOT NULL, 
                          `fax`          varchar(30) DEFAULT '' NOT NULL, 
                          `email`        varchar(255) DEFAULT '' NOT NULL, 
                          `locktodomain` varchar(50) DEFAULT '' NOT NULL, 
                          `uc` blob DEFAULT NULL, 
                          `title`   varchar(40) DEFAULT '' NOT NULL, 
                          `zip`     varchar(10) DEFAULT '' NOT NULL, 
                          `city`    varchar(50) DEFAULT '' NOT NULL, 
                          `country` varchar(40) DEFAULT '' NOT NULL, 
                          `www`     varchar(80) DEFAULT '' NOT NULL, 
                          `company` varchar(80) DEFAULT '' NOT NULL, 
                          `image` tinytext DEFAULT NULL, 
                          `tsconfig` text DEFAULT NULL, 
                          `lastlogin` int unsigned DEFAULT 0 NOT NULL, 
                          `is_online` int unsigned DEFAULT 0 NOT NULL, 
                          `felogin_redirectpid` tinytext DEFAULT NULL, 
                          `felogin_forgothash` varchar(80) DEFAULT '', 
                          `uid`                int DEFAULT 0 NOT NULL, 
                          `crdate`             int DEFAULT 0 NOT NULL, 
                          `TABLE`              varchar(255) DEFAULT '' NOT NULL, 
                          INDEX `parent` (pid, username(100)), 
                          INDEX `username` (username(100)), 
                          INDEX `is_online` (is_online), 
                          PRIMARY KEY(identifier) 
             ) 
             DEFAULT character 
SETSET utf8mb4 COLLATE utf8mb4_unicode_ci engine = innodb
PRIMARY KEY(identifier)

This causes errors in backend. Tested with TYPO3 9.5.1.

Actions #1

Updated by Georg Ringer almost 6 years ago

  • Description updated (diff)
Actions #2

Updated by Georg Ringer almost 6 years ago

  • Status changed from New to Needs Feedback

there is no field identifier in TYPO3 core in table fe_users?!

Actions #3

Updated by Armin Vieweg almost 6 years ago

True. I'm also very confused. I've searched the whole core for VARCHAR 85 but I've only found VARCHAR 80.

I think that this new "SchemaParser" is the reason. But I did not figure out, why this happens. It does not happen on all my 9.5 installations.

Actions #4

Updated by Armin Vieweg almost 6 years ago

Also

`NAME`         varchar(160) DEFAULT '' NOT NULL,
`TABLE`              varchar(255) DEFAULT '' NOT NULL, 

are strange cols. And I swear, I've copied it 1:1 from DatabaseCompare in Install Tool.

Actions #5

Updated by Armin Vieweg almost 6 years ago

Okay I was able to reproduce the steps:

1. Checkout https://bitbucket.org/t--3/signing
2. Change directory to root of extension
3. Perform vagrant up

This Vagrantbox requires:
- VirtualBox
- and the Vagrant plugin: bindfs, hostmanager and winnfsd (for windows only).

It uses NFS to sync data.


The provisioning scripts fetch and install TYPO3 automatically (using typo3_console). Now when I create the first fe_user, I get this error in backend:

Argument 3 passed to TYPO3\CMS\Core\DataHandling\History\RecordHistoryStore::addRecord() must be of the type array, null given, called in /var/www/typo3_9/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 7321

The fe_users record has been created, with UID 0.
Also identifier and table columns are existing, but both contain an empty string.

Now I can't create a second user. This causes the following notice in backend:

2: SQL error: 'Duplicate entry '0' for key 'PRIMARY'' (fe_users:NEW5c051f80b7be3508774189

When I delete the fe_users table and check the Database Compare, I'll get the SQL from the description in this issue.

Actions #6

Updated by Benni Mack almost 6 years ago

Hey armin,

so you want to create a table called "fe_users" where "uid" is NOT the primary key? This won't work.

Actions #7

Updated by Armin Vieweg almost 6 years ago

Oh man... I'm that blind. Totally my fault! Sorry.

Please reject this issue. Thanks!

Actions #8

Updated by Riccardo De Contardi almost 6 years ago

  • Status changed from Needs Feedback to Closed

@Armin Vieweg thank you for your feedback.

Closed as agreed with the reporter.

Actions

Also available in: Atom PDF