Project

General

Profile

Actions

Bug #68464

closed

TYPO3 uses id for wrong table

Added by Kornexl Anton over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-07-22
Due date:
% Done:

0%

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

Description

Typo3 uses id (19681 here) from pages-table and updates the tt_content-table with same id.
I have shortened the record titles in the following excerpt.
(see 9:40:34 and 9:40:39, 9:40:43 and 9:41:09)

09:41:09 ze@LIVE DB Move Moved record 'Wirt.-...' (pages:19681) on page 'Forschungsschwerpunkte' (19623) (msg#1.4.4)
09:41:09 ze@LIVE DB Update Record 'Prüfungen' (tt_content:19681) was updated. (Online). (msg#1.2.10)
09:41:09 ze@LIVE DB Update Record 'Prüfungen' (tt_content:19681) was updated. (Online). (msg#1.2.10)
09:40:43 ze@LIVE DB Update Record 'Wirt.-...' (pages:19681) was updated. (Online). (msg#1.2.10)
09:40:39 ze@LIVE DB Move Moved record 'Wirt.- ...' (pages:19681) from page 'CEP' (19621) (msg#1.4.3)
09:40:39 ze@LIVE DB Move Moved record 'Wirt.-...' (pages:19681) to page 'Forschungsschwerpunkte' (19623) (msg#1.4.2)
09:40:39 ze@LIVE DB Update Record 'Prüfungen' (tt_content:19681) was updated. (Online). (msg#1.2.10)
09:40:39 ze@LIVE DB Update Record 'Prüfungen' (tt_content:19681) was updated. (Online). (msg#1.2.10)
09:40:34 ze@LIVE DB Update Record '...' (pages:19681) was updated. (Online). Changes in fields: title. (msg#1.2.10)
09:39:41 ze@LIVE DB Update Record '...' (pages:19681) was updated. (Online). Changes in fields: title. (msg#1.2.10)
09:39:36 ze@LIVE DB Insert Record '...' (pages:19681) was inserted on page 'CEP' (19621) msg#1.1.10)

The tt_content record is associated with a page (6559) the user has no access to.
He can't update this page and the content on this page.

The effect of this wrong update was a disorder of the CEs on the containing page(6559).

Maybe the installed php-suhosin disturbed the request.


Files

19803.mysqlbinlog (2.9 KB) 19803.mysqlbinlog mysqlbinlog-entries at the time of the problem Kornexl Anton, 2015-08-13 14:52
Actions #1

Updated by Frank Nägler over 9 years ago

  • Status changed from New to Needs Feedback
Actions #2

Updated by Frank Nägler over 9 years ago

  • Status changed from Needs Feedback to New
Actions #3

Updated by Susanne Moog over 9 years ago

  • Subject changed from Typo3 uses id for wrong table to TYPO3 uses id for wrong table
  • Status changed from New to Needs Feedback

Hey,

I tried reproducing this issues without any luck. Can you try to create a test case (step by step) on how to reproduce this behavior?

Thanks,

Susi

Actions #4

Updated by Kornexl Anton over 9 years ago

PHP-suhosin is not responsible because it is now removed from the server. The linux server got rebooted yesterday.
I can't reproduce the error as admin.
The problem occurs probably only after insertion of a new page.

But I have another example from today:
--------------------------------------------
11:28:56 pa@LIVE DB Update Record 'Themen für Masterarbeiten' (pages:19727) was updated. (Online). (msg#1.2.10)
11:28:51 pa@LIVE DB Move Moved record 'Themen für Masterarbeiten' (pages:19727) from page 'Prof. Dr. ...' (17093) (msg#1.4.3)
11:28:51 pa@LIVE DB Move Moved record 'Themen für Masterarbeiten' (pages:19727) to page 'Studium ...' (17099) (msg#1.4.2)

11:28:51 pa@LIVE DB Update Record 'Bild mit Inlinetext' (tt_content:19727) was updated. (Online). (msg#1.2.10)
11:28:51 pa@LIVE DB Update Record 'Bild mit Inlinetext' (tt_content:19727) was updated. (Online). (msg#1.2.10)

11:28:24 pa@LIVE DB Update Record 'Themen für Masterarbeiten' (pages:19727) was updated. (Online). (msg#1.2.10)
11:28:18 pa@LIVE DB Insert Record 'Themen für Masterarbeiten' (pages:19727) was inserted on page 'Prof. Dr. ...' (17093) (msg#1.1.10)
--------------------------------------------

The CE 19727 belongs to page 6692. This page is deleted since March 2013.
Nobody could have modified this page.

Mysqlbinlog shows the following insert for tt_content:19727 above
---------------------------------------------------------------------
  1. at 881539314
    #150724 11:28:51 server id 1 end_log_pos 881539494 Query thread_id=51357 exec_time=0 error_code=0
    SET TIMESTAMP=1437730131/*!*/;
    UPDATE tt_content SET colPos=NULL,tx_gridelements_container=NULL,tx_gridelements_columns=NULL WHERE uid=19727
  1. at 881541373
    #150724 11:28:51 server id 1 end_log_pos 881541553 Query thread_id=51357 exec_time=0 error_code=0
    SET TIMESTAMP=1437730131/*!*/;
    UPDATE tt_content SET colPos=NULL,tx_gridelements_container=NULL,tx_gridelements_columns=NULL WHERE uid=19727
Actions #5

Updated by Kornexl Anton over 9 years ago

Now i have another example:

The page 19733 is created and one second later tt_content with this same ID 19733 gets updated from a user who has no access right for the containing page (5225)

10:48:53 ze@LIVE  DB  Move  Moved record 'Presseberichte' (pages:19733) from page 'Kontakt' (19622) (msg#1.4.3) 
10:48:53 ze@LIVE DB Move Moved record 'Presseberichte' (pages:19733) to page 'CEP' (19621) (msg#1.4.2)
10:48:53 ze@LIVE  DB  Update  Record 'Think Tank-Treffen' (tt_content:19733) was updated. (Online). (msg#1.2.10) 
10:48:53 ze@LIVE DB Update Record 'Think Tank-Treffen' (tt_content:19733) was updated. (Online). (msg#1.2.10)
10:48:47 ze@LIVE  DB  Move  Moved record 'Presseberichte' (pages:19733) from page 'CEP' (19621) (msg#1.4.3) 
10:48:47 ze@LIVE DB Move Moved record 'Presseberichte' (pages:19733) to page 'Kontakt' (19622) (msg#1.4.2)
10:48:25 ze@LIVE DB Move Moved record 'Presseberichte' (pages:19733) on page 'CEP' (19621) (msg#1.4.4)
10:48:25 ze@LIVE  DB  Update  Record 'Think Tank-Treffen' (tt_content:19733) was updated. (Online). (msg#1.2.10) 
10:48:25 ze@LIVE DB Update Record 'Think Tank-Treffen' (tt_content:19733) was updated. (Online). (msg#1.2.10)
10:48:12 ze@LIVE  DB  Update  Record 'Presseberichte' (pages:19733) was updated. (Online). Changes in fields: title.   (msg#1.2.10) 
10:48:03 ze@LIVE DB Move Moved record '[Standard-Titel]' (pages:19733) on page 'CEP' (19621) (msg#1.4.4)
10:48:03 ze@LIVE  DB  Update  Record 'Think Tank-Treffen' (tt_content:19733) was updated. (Online). (msg#1.2.10) 
10:48:03 ze@LIVE DB Update Record 'Think Tank-Treffen' (tt_content:19733) was updated. (Online). (msg#1.2.10)
10:48:02 ze@LIVE  DB  Insert  Record '[Standard-Titel]' (pages:19733) was inserted on page 'CEP' (19621) (msg#1.1.10)
tt_content:19733 belongs to page:5225 
The user ze has no rights to modify page:5225
the correponding entries from mysqlbinlog are:

#150728 10:48:03 server id 1 end_log_pos 488870991 Query thread_id=354016 exec_time=0 error_code=0
SET TIMESTAMP=1438073283/*!*/;
UPDATE tt_content SET colPos='0',tx_gridelements_container='0',tx_gridelements_columns='0' WHERE uid=19733
/*!*/;

#150728 10:48:25 server id 1 end_log_pos 491429966 Query thread_id=354049 exec_time=0 error_code=0
SET TIMESTAMP=1438073305/*!*/;
UPDATE tt_content SET colPos='0',tx_gridelements_container='0',tx_gridelements_columns='0' WHERE uid=19733
/*!*/;

#150728 10:48:53 server id 1 end_log_pos 492976449 Query thread_id=354091 exec_time=0 error_code=0
SET TIMESTAMP=1438073333/*!*/;
UPDATE tt_content SET colPos='0',tx_gridelements_container='0',tx_gridelements_columns='0' WHERE uid=19733

I have the complete mysqlbinlog from the critical intervall saved.

Actions #6

Updated by Alexander Opitz over 9 years ago

  • Target version changed from 6.2.14 to 6.2.15
Actions #7

Updated by Alexander Opitz over 9 years ago

Using TYPO3 6.2.14

13:00:26        user_01@LIVE      DB      Prüfen        Moved record 'Bla' (pages:1446) from page 'Footer' (21) (msg#1.4.3)
13:00:26        user_01@LIVE      DB      Prüfen        Moved record 'Bla' (pages:1446) to page 'Blub' (6) (msg#1.4.2)
13:00:17        user_01@LIVE      DB      Aktualisieren Record 'Bla' (pages:1446) was updated. (Online). (msg#1.2.10)
13:00:17        user_01@LIVE      DB      Einfügen      Record 'Bla' (pages:1446) was inserted on page 'Footer' (21) (msg#1.1.10)

Can't reproduce.

Do you maybe have an extension which hooks/XClasses DataHandler?

UPDATE: Did this again and checked before that a content uid exists which have same number as the page that will be freshly created. But I couldn't reproduce.

Actions #8

Updated by Kornexl Anton over 9 years ago

I can' actively reproduce the problem either.
Everyday i have some examples:
Just from today

11:31:06 maechl01@LIVE DB Move Moved record '[Standard-Titel]' (pages:19803) on page 'CEP' (19621) (msg#1.4.4)
11:31:06 maechl01@LIVE DB Update Record 'mentUP - Mentoring-Programm an der Universität Passau' (tt_content:19803) was updated. (Online). (msg#1.2.10)
11:31:06 maechl01@LIVE DB Update Record 'mentUP - Mentoring-Programm an der Universität Passau' (tt_content:19803) was updated. (Online). (msg#1.2.10)
11:31:06 maechl01@LIVE DB Insert Record '[Standard-Titel]' (pages:19803) was inserted on page 'CEP' (19621) (msg#1.1.10)

mysqlbinlog entries in attache file

I dont know how to find an extension which hooks/XClasses DataHandler.
I have grepped the extension files for DataHandler:
grep -lir DataHandler *|sort -u
dd_googlesitemap/Classes/Hooks/TceMain.php
direct_mail/Classes/DirectMailUtility.php
direct_mail/Classes/Importer.php
direct_mail/Classes/Module/Dmail.php
direct_mail/Classes/Module/RecipientList.php
direct_mail/Classes/Module/Statistics.php
gridelements/Classes/DataHandler/AbstractDataHandler.php
gridelements/Classes/DataHandler/AfterDatabaseOperations.php
gridelements/Classes/DataHandler/MoveRecord.php
gridelements/Classes/DataHandler/PreProcessFieldArray.php
gridelements/Classes/DataHandler/ProcessCmdmap.php
gridelements/Classes/Hooks/DataHandler.php
gridelements/ext_tables.php
gridelements/fix for updates of children having 0 as container.diff
static_info_tables/Classes/Hook/Core/DataHandling/ProcessDataMap.php

Actions #9

Updated by Alexander Opitz over 9 years ago

Ask one of the editor how he add and move the pages. Maybe it is a gridelements issue.
Till yet I don't understand, why the editors create pages and move them afterwards around. ;)

Actions #10

Updated by Kornexl Anton over 9 years ago

We have found some editors (from student to professor) which triggered the problem.

I will ask a student who triggered the problem in a sequence of about 10 adjacent new Ids.

In many situations the problem is triggered after generating a new page and moving this page without inserting a CE.
I will search the different sequences the problem arises.

I found the three columns
colPos,tx_gridelements_container,tx_gridelements_columns
mentioned in
gridelements/Configuration/TCA/Overrides/tt_content.php:$GLOBALS['TCA']['tt_content']['ctrl']['requestUpdate'] .= ',tx_gridelements_container,tx_gridelements_columns,colPos';

Installed is grid_elements in Version 3.1.0
I didn't check the newly available version 3.2.

Actions #11

Updated by Alexander Opitz over 9 years ago

As I don't use grid_elements ... I'm out here.

But it may be that the "requestUpdate" have the issues. But please first update (issue may be resolved inside gridelements) and then ask the gridelements authors.

Actions #12

Updated by Kornexl Anton over 9 years ago

After further analyzing the problem samples:

the problem arises by moving an empty page (without CEs) with the mouse

with gridelements 3.1.0 i could reproduce the failure with this move of a page
---
with gridelements 3.2.0 (stable) i can't reproduce the failure with this action anymore

The issue can be closed

Actions #13

Updated by Alexander Opitz over 9 years ago

  • Status changed from Needs Feedback to Closed
  • Target version deleted (6.2.15)

Thanks for your feedback.

Actions

Also available in: Atom PDF