Project

General

Profile

Actions

Bug #15314

closed

can't add pages or content because adodb sequences are setup incorrectly

Added by Joerg Schoppet almost 19 years ago. Updated over 18 years ago.

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

0%

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

Description

Always if I try to add a page or content, nothing happens.
In the DBAL-DEBUG-LOG I found the following errors:

Number 1:

sqlError Column 'l18n_diffsource' cannot be null
typo3/alt_doc.php
INSERT INTO tt_content ( CType, starttime, endtime, layout, colPos, date, header_position, header_layout, text_align, text_face, text_size, text_color, imagewidth, imageheight, imageorient, imagecols, imagecaption_position, cols, recursive, menu_type, list_type, table_bgColor, table_border, table_cellspacing, table_cellpadding, spaceBefore, spaceAfter, section_frame, splash_layout, sectionIndex, sorting, pid, sys_language_uid, linkToTop, header, header_link, bodytext, rte_enabled, text_properties, hidden, fe_group, l18n_diffsource, tstamp ) VALUES ( 'text', '0', '0', '0', '0', '0', '', '0', '', '0', '0', '0', '0', '0', '8', '0', '', '0', '0', '0', '', '0', '0', '0', '0', '0', '0', '0', '0', '1', '256', '1', '0', '0', 'Test', '', '', '0', '0', '0', '', null, '1135769362' )

Number 2:

sqlError Column 'log_data' cannot be null
typo3/alt_doc.php
INSERT INTO sys_log ( userid, type, action, error, details_nr, details, log_data, tablename, recuid, IP, tstamp, event_pid, NEWid, workspace ) VALUES ( '1', '1', '1', '0', '10', 'Record \'%s\' (%s) was inserted on page \'%s\' (%s)', null, 'tt_content', '1570', '199.42.240.136', '1135769362', '0', 'NEW43b27708e0e9b', '0' )

In localconf.php I added the following dbal-lines:
$TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array(
'_DEFAULT' => array(
'type' => 'native',
),
);
$TYPO3_CONF_VARS['EXTCONF']['dbal']['debugOptions'] = array(
'enabled' => TRUE,
'printErrors' => TRUE,
'EXPLAIN' => 1,
'parseQuery' => 1,
'joinTables' => 1,
);

(issue imported from #M2106)


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #15317: MySQL Error when installing sys_action with the extension manager in 4.0beta1ClosedKarsten Dambekalns2005-12-28

Actions
Related to TYPO3 Core - Bug #15364: SQL error creating a begroupClosedKarsten Dambekalns2006-01-05

Actions
Related to TYPO3 Core - Bug #15347: cannot add user or usergroups to fe or be (form is not saved)ClosedKarsten Dambekalns2006-01-03

Actions
Has duplicate TYPO3 Core - Bug #15507: Can't create new pagesClosed2006-01-26

Actions
Actions #1

Updated by Karsten Dambekalns almost 19 years ago

What MySQL version are you using? Any relevant options set (e.g. SQL_MODE)?

Actions #2

Updated by Joerg Schoppet almost 19 years ago

Hi,
it's 4.1.14.

I don't know if there are any relevant options. How do I find them?

If I change the column information from "not nul" to "null" then it works.

Actions #3

Updated by Karsten Dambekalns almost 19 years ago

I know what causes this, just have to find the best way to fix it. In DBAL updates/inserts affecting BLOB fields are split. First all non-BLOB fields are handled, then the BLOB fields one after the other - this is needed for databases where for BLOB handling special methods t have to be used.
Now we try to insert null in place of the BLOB in the first pass, this is what goes wrong, because for MySQL we do not drop (NOT) NULL defintions on it (which we do on other systems because of other reasons unrelated to this). Sadly there is no empty_blob() in ANSI SQL...

Actions #4

Updated by Joerg Schoppet almost 19 years ago

May I help in any way? Testing or something like that?

Actions #5

Updated by Joerg Schoppet almost 19 years ago

Hi,
the overall behavior now works, BUT
- sometimes (not savely reproducable), when I add new page-content and save I get the error-message "You don't have the proper permissions." The record is saved.
- always when I add content or pages I found the following incomplete message in the log:
Record '%s' (%s) was inserted on page '%s' (%s) (msg#1.1.10)

Actions #6

Updated by Karsten Dambekalns almost 19 years ago

THis is now the "master record" for the related bugs...

Actions #7

Updated by Karsten Dambekalns almost 19 years ago

1) Do a fresh setup with DBAL enabled from the start -> everything works, I just checked this. PHP 5.1.2, MySQL 4.1.15.
2) Do a fresh setup without DBAL, then install/activate it -> creating records doesn't work.

This is caused by the way auto_increment is handled through ADOdb. It doesn't use MySQL's auto_increment, but rather emulates sequences, when they are not available. If there are already records in a table, and you switch to DBAL, the new (emulated) sequence starts with 1, not with the current highest value (uid). On the next save, this most likely leads to a "duplicate key" error.

The fact that this error isn't visible in the DBAL log is another bug-in-the-bug...

Actions #8

Updated by Joerg Schoppet almost 19 years ago

Can I help in any way?

Actions #9

Updated by Nikolas Hagelstein over 18 years ago

Hmm quick and dirty workaround: adjust sequenz start id in adodb (adobe-mysql.inc.php) to something like 10000 ;)

Actions #10

Updated by Joerg Schoppet over 18 years ago

I've just tried Typo3-4.0rc1.
1. When I have just installed adoDB and DBAL without any further configuration the creation of new pages works fine. But if I want to create page-content I get the following error-message:
"102: These fields are not properly updated in database: (l18n_diffsource) Probably value mismatch with fieldtype."
But the content is added.

2. In the Log every message is not right formatted:
Record '%s' (%s) was inserted on page '%s' (%s) (msg#1.1.10)
Record '%s' (%s) was updated. Changes in fields: . (msg#1.2.10)

Actions #11

Updated by Karsten Dambekalns over 18 years ago

Regarding comment 6387: the l18n_diffsource-issue was another bug and has been fixed meanwhile.

I just set up on PostgreSQL with TYPO3, ADOdb, DBAL from today's CVS and installing, creating pages and creating content work fine so far.

Actions #12

Updated by Karsten Dambekalns over 18 years ago

The upcoming version will solve this by providing a new per-handler configuration option for specifying the initial value of the generated sequences/serials/...

Actions

Also available in: Atom PDF