# \[BUG?\] Kategorien -&gt; Artikel-Auswahl

**URL:** https://forum.shopware.com/t/bug-kategorien-gt-artikel-auswahl/6139
**Category:** Shopware 3.5
**Tags:** general
**Created:** [10. Februar 2012 um 16:55 UTC](https://forum.shopware.com/t/bug-kategorien-gt-artikel-auswahl/6139 "2012-02-10T16:55:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dsinf](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@dsinf](https://forum.shopware.com/u/dsinf)
#### Post date: [10. Februar 2012 um 16:55 UTC](https://forum.shopware.com/t/bug-kategorien-gt-artikel-auswahl/6139/1 "2012-02-10T16:55:17Z")

</div>

Hallo, Drag-n-Drop von Artikeln im Backendmodul Kategorien funktioniert in der v3.5.6 nicht. Zumindest nicht bei mir. Zwar lassen sich Artikel “rüberschieben” - aber nach dem Speichern sind diese wieder weg. -\> /engine/backend/modules/categories/ajax/saveArticles.php wird aufgerufen (ohne Antwort) Ausgabe von $sql in der function sInsertArticleCategories($articleIDs, $categoryIDs) ergibt folgendes Statement: `INSERT INTO s\_articles\_categories (categoryID, articleID, categoryparentID) SELECT c.id as categoryID, a.id as articleID, IF((SELECT 1 FROM `s_categories` WHERE parent=c.id LIMIT 1),c.parent, c.id) as categoryparentID FROM s\_articles a, s\_categories c WHERE a.id IN (3) AND c.id IN (43,14,10,3) ORDER BY articleID, categoryparentID, categoryID ON DUPLICATE KEY UPDATE categoryparentID=VALUES(categoryparentID)` Obenstehendes Statement erzeugt SQL-Fehler: Unknown colument categoryparentID in order-clause. Wäre schön, wenn man das beheben könnte. So funktioniert es jedenfalls `INSERT INTO s\_articles\_categories (categoryID, articleID, categoryparentID) SELECT c.id as categoryID, a.id as articleID, IF((SELECT 1 FROM `s_categories` WHERE parent=c.id LIMIT 1),c.parent, c.id) as categoryparentID FROM s\_articles a, s\_categories c WHERE a.id IN (3) AND c.id IN (43,14,10,3) ORDER BY articleID, categoryparentID, categoryID ON DUPLICATE KEY UPDATE categoryparentID=VALUES(categoryparentID)`

---

<div class="post-metadata">

### Author: ![SebastianKloepper](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sebastiankloepper/32/21435_2.png) [@SebastianKloepper](https://forum.shopware.com/u/SebastianKloepper)
#### Post date: [10. Februar 2012 um 17:37 UTC](https://forum.shopware.com/t/bug-kategorien-gt-artikel-auswahl/6139/2 "2012-02-10T17:37:38Z")

</div>

Hallo, ich hab das gerade auch getestet (in diversen Shops) und kann dein Problem nicht bestätigen. Gibt es bei dir irgendwelche Anpassungen, z.B. auf DB-Ebene? Es ist somit irgendein Problem in deiner Umgebung

---

<div class="post-metadata">

### Author: ![dsinf](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@dsinf](https://forum.shopware.com/u/dsinf)
#### Post date: [10. Februar 2012 um 19:51 UTC](https://forum.shopware.com/t/bug-kategorien-gt-artikel-auswahl/6139/3 "2012-02-10T19:51:03Z")

</div>

Hallo, beim Post oben sollte das erste SQL eigentlich den Fehler enthalten. In der orderClause stand sowas wie `ORDER BY articleID, categoryID=categoryparentID, categoryID` Ich habe das SQL-Statement direkt in phpmyAdmin eingegeben und es kam die genannte Fehlermeldung. In der genannten Funktion steht dieses Statement auch exakt so drin. Also, kann es höchstens sein, dass sich an der MySQL-Syntax etwas geändert hat und die von mir verwendete MySQL-Version nicht die benötigte Version ist (ich prüfe das noch und gebe die SQL-Version noch bekannt). Viele Grüße
