Project

General

Profile

Actions

Bug #16807

closed

create admin user fails because of bad be_users table definition

Added by Alban Cousinie almost 18 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Should have
Category:
Install Tool
Target version:
-
Start date:
2006-12-22
Due date:
% Done:

0%

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

Description

When installing from scratch typo3 4.0.4 with mysql 5, the creation of the admin user fails silently (and is being reported as sucessful : why not display a mysql_error() when the request fails ?). After enabling mysql logging, I was able to capture the create admin query which is in my case :
INSERT INTO be_users
(
username,
password,
admin,
uc,
fileoper_perms,
tstamp,
crdate
) VALUES (
'hyptique',
'5f756609613af47ba8ef6808695f77c7',
'1',
'',
'7',
'1166784931',
'1166784931'
)

I typed into phpMyadmin and the request fails with the following error :
#14916 - Field 'usergroup' doesn't have a default value

Now if you look at the table definition created from the install tool, you will notice the field 'usergroup' (which is not present into the create admin query thus falls back to default value) is specified as NOT NULL and doesn't have a default value.

The same goes for many other fields in the be_users table.

(issue imported from #M4691)


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #16809: FIX FOR Typo3 basic tables definition not compliant with MySQL 5.0 strict mode enabled by defaultClosedDmitry Dulepov2006-12-22

Actions
Actions #1

Updated by Alban Cousinie almost 18 years ago

the query fails on the following fields :
usergroup
userMods
allowed_languages
TSconfig
usergroup_cached_list

Changing their specification from 'NOT NULL' TO 'NULL' into Phpmyadmin allows the create admin query to complete successfully.

Proposed fix is to alter the be_users table definition from t3lib\stddb\tables.sql and remove the 'NOT NULL' statement of any field not specifying a DEFAULT value.

Actions #2

Updated by Alban Cousinie almost 18 years ago

This problem is likely to affect other areas of typo3 as well since it can be found in many table definitions. It probably does not occur on all mysql versions, otherwise it would have been reported often.

Actions #3

Updated by Alban Cousinie almost 18 years ago

This issue is a duplicate of 0002634 and 0004003. Strangely it has not been fixed so far

Actions #4

Updated by Alban Cousinie almost 18 years ago

I have just fixed the issue. See issue 0004693 for patch.
Replace t3lib/stddb/tables.sql with the one supplied in issue 0004693, delete your typo3 database and recreate it. Things should now be fine.

Actions

Also available in: Atom PDF