Project

General

Profile

Actions

Bug #38417

closed

Duplicate tt_content translation records in the database

Added by Dennis Schubert almost 12 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-06-27
Due date:
% Done:

0%

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

Description

I just spent some hours debugging a TYPO3 installation we are maintaining. We changed some localized records in the backend but the changes were not shown in the frontend. I thought it was a caching problem but after some time of researching I found out there ware some duplicate localization records in the database, see Image 1.

Query used:
SELECT pid, uid, l18n_parent, sys_language_uid, deleted, hidden, tstamp, crdate, cruser_id FROM tt_content WHERE l18n_parent = 14473 AND deleted = 0 ORDER BY sys_language_uid ASC, tstamp ASC

I am pretty sure this should never happen... That duplicate entries made it nearly impossible to debug because only one record per language was shown in the backend. Unfortunately, this record was not the record shown in the frontend, so I modified a record which was not shown in the frontend but in the backend. I had no chance to edit the second record in the backend, it was not even visible in the list-view (which, of course, is filtering by one record per language).

I wrote a quick and dirty PHP script to check some other installations and a lot of setups had duplicate records. I attached that script so you can check out your installations, too.

All installations are on 4.5.17 right now but a lot of upgrading was done over the years. The site I found that mistake was installed on 4.4.


Files

duplicate_i18n.jpg (318 KB) duplicate_i18n.jpg Image 1, duplicate records in the database Dennis Schubert, 2012-06-27 10:21
chki18nuniq.php (932 Bytes) chki18nuniq.php The PHP script I used to check if an installation has duplicate records or not Dennis Schubert, 2012-06-27 10:21
Actions

Also available in: Atom PDF