Project

General

Profile

Actions

Bug #52596

closed

Creating pages tries to assign empty string to integer field

Added by Tomas Norre Mikkelsen about 11 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2013-10-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hi,

I recently discovered an issue after upgrading to MySQL 5.6 when creating pages.

When creating a page, following $fieldArray is tried to be inserted.

array (\n
'doktype' => '1',\n
'hidden' => '1',\n
'starttime' => '0',\n
'endtime' => '0',\n
'layout' => '0',\n
'url_scheme' => 0,\n
'urltype' => '1',\n
'lastUpdated' => '0',\n
'newUntil' => '0',\n
'cache_timeout' => '0',\n
'shortcut_mode' => '0',\n
'module' => '',\n
'backend_layout' => '',\n
'backend_layout_next_level' => '',\n
'perms_userid' => '1',\n
'perms_groupid' => 0,\n
'perms_user' => 31,\n
'perms_group' => 27,\n
'perms_everybody' => 0,\n
'sorting' => 256,\n
'pid' => 0,\n
'title' => '[Default Title]',\n
'crdate' => 1381052264,\n
'cruser_id' => '1',\n
'tstamp' => 1381052264,\n
't3ver_stage' => 0,\n
),

Which is ok, but the backend_layout and backend_layout_next_level fields are both set as empty strings '', which is tried to set into integer fields. This is a problem with MySQL 5.6 default setup cause it uses: sql_mode=STRICT_TRANS_TABLES ( or at least in osx it does)

This can for sure just be changes, but it might be a wanted configuration for some and it should be supported by TYPO3 too.

The "issue" as I see it is:

Why try to assign an empty string to an integer field. If the wanted behaviour is that it should be the default values, these should not be set in the fieldArray but be handled by the table definitions.

I don't have a solution for this, just wanted to address the issue.

I'll be glad helping figuring out this issue. But the main idea was to address the issue so we know which direction we should go.

Cheers

Is for sure related to:
http://forge.typo3.org/issues/18866


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #18866: Cannot create page with Mysl in strict mode (STRICT_TRANS_TABLES)RejectedAlexander Opitz2008-05-28

Actions
Actions

Also available in: Atom PDF