View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007362 | OXID eShop (all versions) | 2.4. Administer products | public | 2022-09-23 11:34 | 2022-11-22 10:13 |
Reporter | kai.machemehl | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 6.5.0 | ||||
Fixed in Version | 6.5.1 | ||||
Summary | 0007362: Deleting Categories with more than one SEO Entry | ||||
Description | When trying to delete a Category with more than one SEO Entry, deletion is triggered but ends in an Maintenance Mode Error in Admin. This error is thrown: "SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row" This seems to happen in class vendor/oxid-esales/oxideshop-ce/source/Application/Model/SeoEncoderCategory.php method: setRelatedToCategorySeoUrlsAsExpired Following this, the category is deleted but all SEO Entries are kept in Database. | ||||
Steps To Reproduce | - Create category in admin backend - For this category create at least for two languages a SEO entry in SEO tab. - Try deleting the category | ||||
Additional Information | Had to put the log entry into the comments, since Mantis didn't allow it here. Comment with the log: https://bugs.oxid-esales.com/view.php?id=7362#c14332 | ||||
Tags | Admin, Category, Database, SEO | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | 8.1 | ||||
Database Version | MariaDB 10.4 | ||||
|
Hi kai.machemehl, thank you for your report. I tried but couldn't reproduce the case. I tracked the table "oxseo" during creating new SEOs for one category. Whenever I changed the SEO in the admin then the old entry got moved to the table oxseohistory (which can hold multiple records for an object) and got a new record in oxseo. The table oxseo holds only one record at a time for an object per language per shop id. When I deleted the category, the entry got removed from oxcategories, oxseo and oxseohistory. There were no rows with the oxid of the category left. I got the impression that your oxseo tables holds multiple records for one object per language per shop id. Maybe some changes within the framework were made and cause this issue. Else I need further instructions how I can reproduce the case on a current shop version. Best, Michael |
|
That's an misunderstanding sorry. I created one SEO Entry for German, and one Seo Entry for english, and then tried deletion. |
|
[2022-09-23 12:40:36] OXID Logger.ERROR: Subquery returns more than 1 row ["[object] (OxidEsales\\Eshop\\Core\\Exception\\DatabaseErrorException(code: 1242): Subquery returns more than 1 row at /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Database/Adapter/Doctrine/Database.php:955, Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing '\n select oxident\n from oxseo\n where oxseo.oxseourl like concat((select oxseourl from oxseo where oxobjectid = ? and oxtype = 'oxcategory'), '%') \n and (oxtype = 'oxcategory' or oxtype = 'oxarticle')\n ' with params [\"9ac3c2e3ad61629f98c4d1eca0231c94\"]:\n\nSQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row at /var/www/oxideshop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128, Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 21000): SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row at /var/www/oxideshop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 21000): SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row at /var/www/oxideshop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)\n[stacktrace]\n#0 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Database/Adapter/Doctrine/Database.php(615): OxidEsales\\EshopCommunity\\Core\\Database\\Adapter\\Doctrine\\Database->convertException(Object(Doctrine\\DBAL\\Exception\\DriverException))\n#1 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Application/Model/SeoEncoderCategory.php(278): OxidEsales\\EshopCommunity\\Core\\Database\\Adapter\\Doctrine\\Database->select('\\n se...', Array)\n#2 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Application/Model/SeoEncoderCategory.php(231): OxidEsales\\EshopCommunity\\Application\\Model\\SeoEncoderCategory->setRelatedToCategorySeoUrlsAsExpired(Object(OxidEsales\\Eshop\\Application\\Model\\Category))\n#3 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Application/Model/Category.php(333): OxidEsales\\EshopCommunity\\Application\\Model\\SeoEncoderCategory->onDeleteCategory(Object(OxidEsales\\Eshop\\Application\\Model\\Category))\n#4 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ee/Application/Model/Category.php(172): OxidEsales\\EshopCommunity\\Application\\Model\\Category->delete('9ac3c2e3ad61629...')\n#5 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/Admin/AdminListController.php(243): OxidEsales\\EshopEnterprise\\Application\\Model\\Category->delete('9ac3c2e3ad61629...')\n#6 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Controller/BaseController.php(534): OxidEsales\\EshopCommunity\\Application\\Controller\\Admin\\AdminListController->deleteEntry()\n#7 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ee/Core/Controller/BaseController.php(64): OxidEsales\\EshopCommunity\\Core\\Controller\\BaseController->executeFunction('deleteentry')\n#8 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(347): OxidEsales\\EshopEnterprise\\Core\\Controller\\BaseController->executeFunction('deleteentry')\n#9 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(280): OxidEsales\\EshopCommunity\\Core\\ShopControl->executeAction(Object(OxidEsales\\Eshop\\Application\\Controller\\Admin\\CategoryList), 'deleteentry')\n#10 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(142): OxidEsales\\EshopCommunity\\Core\\ShopControl->_process('OxidEsales\\\\Esho...', 'deleteentry', NULL, NULL)\n#11 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(27): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()\n#12 /var/www/oxideshop/source/index.php(16): OxidEsales\\EshopCommunity\\Core\\Oxid::run()\n#13 /var/www/oxideshop/source/admin/index.php(12): require_once('/var/www/oxides...')\n#14 {main}\n"] [] |
|
- MK |