# Shopware 5.7.2 Update API get('articles/') bzw. /api/articles

**URL:** https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167
**Category:** Shopware 5
**Tags:** general, programming
**Created:** [15. Juli 2021 um 11:01 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167 "2021-07-15T11:01:29Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![berlin-web-agency](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/berlin-web-agency/32/13996_2.png) [@berlin-web-agency](https://forum.shopware.com/u/berlin-web-agency)
#### Post date: [15. Juli 2021 um 11:01 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/1 "2021-07-15T11:01:29Z")

</div>

Ahoi - wir haben das Update 5.7.2 eingespielt und nun funktioniert bei zwei shops die API nicht merh richtig. Wir bekommen kein Artikel mehr ausgegeben - hat sich was geändert ? In der Doku ist alles gleich.  
Wir bekommen bei $client-\>get(‚articles/‘); keine Artikel und beim aufruf über die URL also URL/api/articles folgende Fehlermeldung.

{„success“:false,„message“:„Error message: Method „Shopware::Router“ not found failure“}

Hat einer das gleiche Problem ?

---

<div class="post-metadata">

### Author: ![berlin-web-agency](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/berlin-web-agency/32/13996_2.png) [@berlin-web-agency](https://forum.shopware.com/u/berlin-web-agency)
#### Post date: [30. September 2021 um 16:06 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/2 "2021-09-30T16:06:32Z")

</div>

Bei Shopware 5.7.3 das gleiche Problem

---

<div class="post-metadata">

### Author: ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)
#### Post date: [30. September 2021 um 17:09 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/3 "2021-09-30T17:09:37Z")

</div>

EIgentlich ist es so:

```php
$client->get("articles") = alle Artikel
$client->get("articles/12345") = Artikel mit ID 12345

```

Mal ohne „slash“ versucht?

---

<div class="post-metadata">

### Author: ![berlin-web-agency](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/berlin-web-agency/32/13996_2.png) [@berlin-web-agency](https://forum.shopware.com/u/berlin-web-agency)
#### Post date: [30. September 2021 um 17:21 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/4 "2021-09-30T17:21:04Z")

</div>

jap hab ich so versucht … articles/12345 ffunktioniert aber alle artikel würde ja über articles/ gehen - und dort kommt leider der fehler

also konkret  
api/articles/ hab auch api/articles versucht

---

<div class="post-metadata">

### Author: ![berlin-web-agency](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/berlin-web-agency/32/13996_2.png) [@berlin-web-agency](https://forum.shopware.com/u/berlin-web-agency)
#### Post date: [30. September 2021 um 17:37 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/5 "2021-09-30T17:37:15Z")

</div>

Gleiche script läuft bei 5.6.9  
mit slash /api/articles/ aber auch ohne /api/articles

---

<div class="post-metadata">

### Author: ![berlin-web-agency](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/berlin-web-agency/32/13996_2.png) [@berlin-web-agency](https://forum.shopware.com/u/berlin-web-agency)
#### Post date: [18. Oktober 2021 um 13:46 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/6 "2021-10-18T13:46:09Z")

</div>

Bei Shopware 5.7.4 das gleiche Problem

---

<div class="post-metadata">

### Author: ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)
#### Post date: [18. Oktober 2021 um 14:34 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/7 "2021-10-18T14:34:11Z")

</div>

Schon mal im Log nachgeschaut? Ein Shopware-Fehler ist es nicht. Vielleicht liegt es an einem Artikel selber, dass er nicht auslesbar ist und dadurch keine Ausgabe kommt.

---

<div class="post-metadata">

### Author: ![berlin-web-agency](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/berlin-web-agency/32/13996_2.png) [@berlin-web-agency](https://forum.shopware.com/u/berlin-web-agency)
#### Post date: [18. Oktober 2021 um 15:20 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/8 "2021-10-18T15:20:57Z")

</div>

ne /articles/id functioniert und mit 5.6.9 läuft alles. es geht nur um die /articles/ also die ausgabe der Liste aller Artikel

der log gibt dies hier zurück - hier such ich mich grad durch

[2021-10-18T16:07:44.600228+02:00] core.CRITICAL: Method „Shopware::Router“ not found failure {„uid“:„428c5d4“}  
[2021-10-18T16:07:44.600932+02:00] core.ERROR: Enlight\_Exception: Method „Shopware::Router“ not found failure in /var/www/clients/client9/web175/web/engine/Shopware/Controllers/Api/Articles.php:54 Stack trace: #0 /var/www/clients/client9/web175/web/custom/plugins/SwagExtendArticleResource/Components/Api/Resource/Article.php(21): Shopware-\>\_\_call(‚Router‘, Array) #1 /var/www/clients/client9/web175/web/engine/Shopware/Controllers/Api/Articles.php(54): SwagExtendArticleResource\Components\Api\Resource\Article-\>getList(0, 1000, Array, Array, Array) #2 /var/www/clients/client9/web175/web/engine/Library/Enlight/Controller/Action.php(182): Shopware\_Controllers\_Api\_Articles-\>indexAction() #3 /var/www/clients/client9/web175/web/engine/Library/Enlight/Controller/Dispatcher/Default.php(461): Enlight\_Controller\_Action-\>dispatch(‚indexAction‘) #4 /var/www/clients/client9/web175/web/engine/Library/Enlight/Controller/Front.php(225): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #5 /var/www/clients/client9/web175/web/engine/Shopware/Kernel.php(197): Enlight\_Controller\_Front-\>dispatch() #6 /var/www/clients/client9/web175/web/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #7 /var/www/clients/client9/web175/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(Object(Shopware\Kernel), Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /var/www/clients/client9/web175/web/engine/Shopware/Components/HttpCache/AppCache.php(262): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #9 /var/www/clients/client9/web175/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(452): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #10 /var/www/clients/client9/web175/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(346): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>fetch(Object(Symfony\Component\HttpFoundation\Request), true) #11 /var/www/clients/client9/web175/web/engine/Shopware/Components/HttpCache/AppCache.php(189): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #12 /var/www/clients/client9/web175/web/vendor/symfony/http-kernel/HttpCache/HttpCache.php(224): Shopware\Components\HttpCache\AppCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #13 /var/www/clients/client9/web175/web/engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /var/www/clients/client9/web175/web/shopware.php(122): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #15 {main} {„uid“:„428c5d4“}

---

<div class="post-metadata">

### Author: ![berlin-web-agency](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/berlin-web-agency/32/13996_2.png) [@berlin-web-agency](https://forum.shopware.com/u/berlin-web-agency)
#### Post date: [18. Oktober 2021 um 15:25 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/9 "2021-10-18T15:25:06Z")

</div>

ah ich hab ein altes Plugin gefunden - \> Shopware()-\>Router()-\>assemble($query) diese methode soll die single url des Artikels zurück geben → anscheined liegt hier das Problem…  
Is nicht von uns - daher nie danach gesucht

---

<div class="post-metadata">

### Author: ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)
#### Post date: [19. Oktober 2021 um 06:09 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/10 "2021-10-19T06:09:34Z")

</div>

> [@berlin-web-agency](#):
>
> ne /articles/id functioniert und mit 5.6.9 läuft alles. es geht nur um die /articles/ also die ausgabe der Liste aller Artikel

Ja ja, das hatte ich schon verstanden 🙂

Aber ein Blicks in die Logs (Shopware Log UND Server Log) kann manchmal schnell die Lösung finden.

---

<div class="post-metadata">

### Author: ![StefanSchulte](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StefanSchulte](https://forum.shopware.com/u/StefanSchulte)
#### Post date: [21. Februar 2022 um 17:24 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/11 "2022-02-21T17:24:20Z")

</div>

Ich antworte hier mal, da ich vor dem gleichen Problem stehe. Die Fehlerursache habe ich schnell gefunden, doch die Lösung habe ich bisher nicht.

Wie kann ich denn nun bei SW 5.7.x die SEO URL erstellen, wenn Shopware()-\>Router() nicht mehr geht?  
Jemand eine Idee?

---

<div class="post-metadata">

### Author: ![berlin-web-agency](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/berlin-web-agency/32/13996_2.png) [@berlin-web-agency](https://forum.shopware.com/u/berlin-web-agency)
#### Post date: [21. Februar 2022 um 17:48 UTC](https://forum.shopware.com/t/shopware-5-7-2-update-api-get-articles-bzw-api-articles/89167/12 "2022-02-21T17:48:03Z")

</div>

Ahoi Stefan,

ich hab folgendes gefunden / eingebaut

$producturl = Shopware()-\>Front()-\>Router()-\>assemble([  
‚module‘ =\> ‚frontend‘,  
‚sViewport‘ =\> ‚detail‘,  
‚sArticle‘ =\> $article[‚id‘],  
]);
