Bug #48381

after git pull db compare -> CREATE TABLE ( ( categories int(11) NOT NULL default '0' );

Added by Matthias Eberlein over 5 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Must have
Category:
-
Target version:
Start date:
2013-05-19
Due date:
% Done:

100%

TYPO3 Version:
6.1
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello TYPO3 People,
after a git pull TYPO3_6-1 i get in INSTALL TOOL DB Compare this db table error.

ALTER TABLE be_users CHANGE userMods userMods text;
Current value: varchar(255) default NULL

CREATE TABLE ( ( categories int(11) NOT NULL default '0' );

then Compare get the db error

CREATE TABLE ( ( categories int(11) NOT NULL default '0' );
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( ( categories int(11) NOT NULL default '0' )' at line 1

I think that have somthing to do with this [BUGFIX] be_users.userMods is too small to hold all modules https://review.typo3.org/#/c/20885/

greetings
matthias


Related issues

Related to TYPO3 Core - Task #38972: Improve method makeCategorizable to be used everywhere Closed 2012-07-16
Duplicated by TYPO3 Core - Bug #48527: Database error after update to 6.1.1 Closed 2013-05-25

Associated revisions

Revision f5074a57 (diff)
Added by Alexander Opitz over 5 years ago

[BUGFIX] Do not add category to empty table names

If the $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultCategorizedTables']
is empty or you have empty strings between commas then we try to add
empty tablenames to the table definitions.

This is fixed by setting removeEmptyValues to true in trimExplode
and adding a RuntimeException to the add function to prevent
others (extensions) breaking the functionality.

Resolves: #48381
Releases: 6.2, 6.1
Change-Id: I4a8d43a0ff75da298ace4f1d33a5dcf2d2ac569f
Reviewed-on: https://review.typo3.org/20938
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Peter Niederlag
Tested-by: Peter Niederlag

Revision 042370fc (diff)
Added by Alexander Opitz over 5 years ago

[BUGFIX] Do not add category to empty table names

If the $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultCategorizedTables']
is empty or you have empty strings between commas then we try to add
empty tablenames to the table definitions.

This is fixed by setting removeEmptyValues to true in trimExplode
and adding a RuntimeException to the add function to prevent
others (extensions) breaking the functionality.

Resolves: #48381
Releases: 6.2, 6.1
Change-Id: I4a8d43a0ff75da298ace4f1d33a5dcf2d2ac569f
Reviewed-on: https://review.typo3.org/21394
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

History

#1 Updated by Matthias Eberlein over 5 years ago

Matthias Eberlein wrote:

Hello TYPO3 People,
after a git pull TYPO3_6-1 i get in INSTALL TOOL DB Compare this db table error.

ALTER TABLE be_users CHANGE userMods userMods text;
Current value: varchar(255) default NULL

CREATE TABLE ( ( categories int(11) NOT NULL default '0' );

then Compare get the db error

CREATE TABLE ( ( categories int(11) NOT NULL default '0' );
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( ( categories int(11) NOT NULL default '0' )' at line 1

I think that have somthing to do with this [BUGFIX] be_users.userMods is too small to hold all modules https://review.typo3.org/#/c/20885/

greetings
matthias

Tested on 2 Systems. One fresh Installation without any Installed Not System Extension.

#2 Updated by Alexander Opitz over 5 years ago

I have this issue in 6.1.1-dev but not in 6.2-dev

#3 Updated by Alexander Opitz over 5 years ago

  • Status changed from New to Accepted
  • Assignee set to Alexander Opitz

#4 Updated by Alexander Opitz over 5 years ago

The problem is that $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultCategorizedTables'] isn't set (or an empty value) so that CategoryRegistry tries to add a category to an empty table name.

In 6.2 this defaults to 'pages,tt_content'

#5 Updated by Gerrit Code Review over 5 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20938

#6 Updated by Marc Bastian Heinrichs over 5 years ago

Was introduced with #38972

#7 Updated by Bjoern Jacob over 5 years ago

After a fresh installation of 6.1.1 I had the same problem. Setting $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultCategorizedTables'] in Install Tool to 'pages,tt_content' helped me. Thx.

#8 Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20938

#9 Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20938

#10 Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20938

#11 Updated by Alexander Opitz over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#12 Updated by Chris topher over 5 years ago

  • Target version changed from 6.1.1 to next-patchlevel

#13 Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF