# Such-Index lässt sich nicht aufbauen

**URL:** <https://forum.shopware.com/t/such-index-lasst-sich-nicht-aufbauen/55723>\
**Category:** Programmierung\
**Created:** [13. Oktober 2018 um 11:22 UTC](https://forum.shopware.com/t/such-index-lasst-sich-nicht-aufbauen/55723 "2018-10-13T11:22:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![optimondo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/optimondo/32/12853_2.png) [@optimondo](https://forum.shopware.com/u/optimondo)\
**Post date:** [13. Oktober 2018 um 11:22 UTC](https://forum.shopware.com/t/such-index-lasst-sich-nicht-aufbauen/55723/1 "2018-10-13T11:22:02Z")

</div>

Beim Versuch den Such Index aufzubauen wirft die Konsole diesen Fehler (Ausschnitt) aus.&nbsp;Was könnte denn da gemeint sein? Der Shop ist zweisprachig.

```
Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "shop". Did you mean one of these: "....

```

Im Log erscheint auch diese Meldung:&nbsp;_You have requested a non-existent service “shop”._ Ich steig nicht dahinter woher das kommen könnte.

Vielen Dank für evt. Denkanstöße.

Grüße

---

<div class="post-metadata">

**Author:** ![optimondo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/optimondo/32/12853_2.png) [@optimondo](https://forum.shopware.com/u/optimondo)\
**Post date:** [13. Oktober 2018 um 14:18 UTC](https://forum.shopware.com/t/such-index-lasst-sich-nicht-aufbauen/55723/2 "2018-10-13T14:18:59Z")

</div>

Habs selber lösen können.

Ich hab mir testweise ein Plugin installiert, welches offensichtlich fehlerhaft programmiert war.

Schuld war diese Zeile:

```
$this->pluginConfig = $this->config->getByPluginName('NameDesPlugins', Shopware()->Shop());

```

Hinten das _Shopware-\>Shop_ ist unvollständig gewesen. Korrekt wäre hier:

```
$this->pluginConfig = $this->config->getByPluginName('NameDesPlugins', Shopware()->Shop()->getId());

```

Nur für die die das Problem auch mal irgend wann haben sollten&nbsp; ![Wink](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/wink.png "Wink")

---

<div class="post-metadata">

**Author:** ![christiantrade](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@christiantrade](https://forum.shopware.com/u/christiantrade)\
**Post date:** [14. Oktober 2018 um 09:23 UTC](https://forum.shopware.com/t/such-index-lasst-sich-nicht-aufbauen/55723/3 "2018-10-14T09:23:22Z")

</div>

Wäre evtl. gut, wenn du einfach mal das Plugin nennen würdest, damit die Leute das auch wissen und ggf. dem Plugin Hersteller bescheid gibst&nbsp;&nbsp; ![Wink](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/wink.png "Wink")

---

<div class="post-metadata">

**Author:** ![optimondo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/optimondo/32/12853_2.png) [@optimondo](https://forum.shopware.com/u/optimondo)\
**Post date:** [14. Oktober 2018 um 10:54 UTC](https://forum.shopware.com/t/such-index-lasst-sich-nicht-aufbauen/55723/4 "2018-10-14T10:54:15Z")

</div>

Ich wollte hier nicht den Plugin Ersteller defamieren. Hab es noch mal rausgesucht da ich es nur getestet hatte.

Das nennt sich: “Erweiterte Suche +Blog, CMS und Kategorien”.

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [14. Oktober 2018 um 21:10 UTC](https://forum.shopware.com/t/such-index-lasst-sich-nicht-aufbauen/55723/5 "2018-10-14T21:10:18Z")

</div>

> [@optimondo schrieb:](https://forum.shopware.com/profile/29128/optimondo "optimondo")
> 
> Habs selber lösen können.
> 
> Ich hab mir testweise ein Plugin installiert, welches offensichtlich fehlerhaft programmiert war.
> 
> Schuld war diese Zeile:
> 
> $this-\>pluginConfig = $this-\>config-\>getByPluginName(‚NameDesPlugins‘, Shopware()-\>Shop());
> 
> Hinten das _Shopware-\>Shop_ ist unvollständig gewesen. Korrekt wäre hier:
> 
> $this-\>pluginConfig = $this-\>config-\>getByPluginName(‚NameDesPlugins‘, Shopware()-\>Shop()-\>getId());
> 
> Nur für die die das Problem auch mal irgend wann haben sollten&nbsp; ![Wink](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/b3785da0cbf2c8566cb535dcf55b2730b5224899.png "Wink")
> 
> &nbsp;

Der Fix macht gar keinen Sinn. Die Klasse erwartet ein Shop Objekt und nicht die Shop Nummer. Siehe&nbsp;[https://sourcegraph.com/github.com/shopware/shopware/-/blob/engine/Shopware/Components/Plugin/DBALConfigReader.php#L51:21](https://sourcegraph.com/github.com/shopware/shopware/-/blob/engine/Shopware/Components/Plugin/DBALConfigReader.php#L51:21)

---

<div class="post-metadata">

**Author:** ![optimondo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/optimondo/32/12853_2.png) [@optimondo](https://forum.shopware.com/u/optimondo)\
**Post date:** [14. Oktober 2018 um 22:22 UTC](https://forum.shopware.com/t/such-index-lasst-sich-nicht-aufbauen/55723/6 "2018-10-14T22:22:57Z")

</div>

Mag sein. Der Fehler ist weg gewesen und alles funktionierte wieder.&nbsp;

Wie hättest du dieses Problem gelöst? Die Exception steht oben.&nbsp;
