View Issue Details

IDProjectCategoryView StatusLast Update
0007683OXID eShop (all versions)4.06. Language and translationspublic2024-11-07 10:05
Reporter[email protected] Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version7.0.0 
Fixed in Version7.2.0 
Summary0007683: Adding a fifth language to the shop causes database errors
DescriptionWith a vanilla shop version 6.5,7.0 and 7.1, you are not able to correctly add more than four languages to the shop.
At the fifth language, it throws the error "Warnung: Beim Anlegen der neuen Datenbankfelder ist ein Fehler aufgetreten!"

This is happening, because the fields in e.g. oxarticales already existing: oxtitle, oxtitle_1, oxtitle_2, oxtitle_3
Which is covering four languages. When adding the fifth, new fields would be added, which causes the error.

We have narrowed the error down to:
source/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/Admin/LanguageMain.php:387
This is trying to commit a transaction, but the transaction seems to be closed earlier due to the table altering.

Unfortunaltely, changing it to:
            if($db->isTransactionActive()){
                $db->commitTransaction();
            }
Did not solve the problem, because the $db->isTransactionActive() returns true, but should not return true in that specific case.

Tested with Oxid 6.5/7.0/7.1, MySQL 5.7/8.0 and MariaDB 10.5
Steps To Reproduce1. get fresh install of Oxid 6.5/7.x
2. login to admin
3. set up four languages
4. set up the fifth language -> error
Additional InformationThe issue was discussed within a meeting. Heike, Anton and Igor should be aware of it.
Anton was able to reproduce this problem during the meeting
TagsLanguages
ThemeNot defined
BrowserNot defined
PHP Version8.1
Database VersionAll

Activities

[email protected]

2024-06-25 15:43

developer   ~0017089

After some further investigations, I can say that the data base fields actually get created.

But the problem with the commitTransaction throws the error mentioned above and should still be solved, since it is pretty confusing.

michael_keiluweit

2024-06-26 16:04

administrator   ~0017136

To reproduce it a bit easier, add the parameter $this->iLangPerTable = 2; to config.inc.php. Then you only have to create one more language (ID 2) to reproduce the error.