Project

General

Profile

Actions

Bug #17392

closed

DBAL debugger causes backend INSERTs to fail or misbehave

Added by Marcel Gsteiger about 17 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2007-06-17
Due date:
% Done:

0%

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

Description

When the DBAL debugger is active, backend inserts into tables cease to work properly. When the TCA has a ['ctrl']['type'] section and the value of the ['type'] field changes, the BE normally inserts a newly entered record and then repositions to the proper uid.

When the DBAL debugger is enabled, you get the error

Sorry, you didn't have proper permissions to perform this change.

instead (or a completely wrong record, depending on the table sizes).

Some analysis reveals that the last_insert_id does not return the correct value anymore. Obviously now the last_insert id for the debugger log entry is returned (instead the insert id for the record of the user table).

Perhaps the DBAL debugger uses the same mysql connection resource, this could explain this behaviour.
(issue imported from #M5810)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #17235: Sorry, you didn't have proper permissions to perform this change.Closed2007-04-24

Actions
Actions #1

Updated by Marcel Gsteiger about 17 years ago

..perhaps the bug 5485 is the same problem. I can reproduce this bug with native mysql, so it's not a problem of another driver. Using a different connection resource for the DBAL debugger could resolve the issue, I think. Or modifying the last_insert_id function: it knows the table name and could ask specifically for the highest autoincrement value just for this table.

Actions #2

Updated by Xavier Perseguers almost 14 years ago

I just had the problem. In fact, call to $GLOBALS['TYPO3_DB']->sql_insert_id() returns the last created row in tx_dbal_debuglog. Problem appears for instance with code involving t3lib_TCEmain when creating a new page and retrieving the newly created page id with

$newUid = $tce->substNEWwithIDs['NEW0'];

This returns a complete wrong value, in fact the uid of the last record in debug table.

Actions #3

Updated by Alexander Opitz over 10 years ago

  • Status changed from Accepted to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.4
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #4

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Xavier Perseguers)

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF