Project

General

Profile

Actions

Bug #15917

closed

Cant create Pages - SQL Error

Added by Martin Holzhauer over 18 years ago. Updated almost 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2006-03-28
Due date:
% Done:

0%

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

Description

Everytime when i wnat to create a Page i got an SQL error that the Column TSConfig cannot be null.
i tryed to add a simple tsconfig that does nothing when creating the page but i got the same error.

2: SQL error: 'Column 'TSconfig' cannot be null' (pages:NEW4428eea01065b)

i have Typo3 4rc2, PHP5.1.2 with APC Cache

Following Extensions are installed
Database Abstraction Layer dbal 0.9.0
htmlArea RTE rtehtmlarea 1.3.6
Versioning Management version 1.0.0
User>Task Center, Actions sys_action 1.1.2
CSS styled content css_styled_content 0.3.1
Indexed Search Engine indexed_search 2.9.0
ADOdb adodb 4.80.0
TYPO3 skin t3skin 0.0.1
(issue imported from #M3017)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #15905: Install dbal failsClosedKarsten Dambekalns2006-03-27

Actions
Actions #1

Updated by Martin Holzhauer over 18 years ago

Without the DBAL the error is gone
so it seems to be an error with the DBAL

Actions #2

Updated by Manuel Rüter over 18 years ago

Are you using MySQL5?
Maybe the SQL Query fails because of the sql-mode selected for the server. MySQL5 sets very high standars especially for insert querys. You can try to add the line sql-mode=MYSQL4 in your my.ini and try again.

Actions #3

Updated by Martin Holzhauer over 18 years ago

no i use MySQL 4.1.12

Actions #4

Updated by Franz Holzinger over 18 years ago

This happens because media TSconfig have NULL string values in /var/www/html/TYPO3core/typo3/sysext/dbal/class.ux_t3lib_db.php on line 742

Actions #5

Updated by Franz Holzinger over 18 years ago

The error comes from
function INSERTquery.

Here a null is written for 'B' blob fields which have the database constraint NOT NULL.
....
if($this->sql_field_metatype($table,$k) == 'B') {
$nArr[$this->quoteFieldNames($k)] = 'null';
$blobfields[$this->quoteFieldNames($k)] = $v;
}
---------
Array (3) media
String (4) type blob
String (1) metaType B
Integer notnull 0

Array (3) TSconfig
String (4) type blob
String (1) metaType B
Integer notnull 0

Actions #6

Updated by Karsten Dambekalns about 18 years ago

The blob handling was flawed in the sense that it should be skipped for the "native" handler, bit did that only halfway.

In fact it seems as if for "native" the real data never was written for any blob field, which is of course bad. :)

I fixed that and will committ to CVS as soon as it is up again and the RC3 changes have been merged back by Mr. Stucki.

Actions #7

Updated by Michael Stucki about 18 years ago

Should be fixed according to Karsten / didn't check.

Actions

Also available in: Atom PDF