# PHP Exception bzgl. robots.txt

**URL:** <https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515>\
**Category:** Shopware 6 (German)\
**Created:** [28. Januar 2026 um 09:58 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515 "2026-01-28T09:58:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjinthahouse](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bjinthahouse](https://forum.shopware.com/u/bjinthahouse)\
**Post date:** [28. Januar 2026 um 09:58 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/1 "2026-01-28T09:58:19Z")

</div>

Hi zusammen,

ich bekomme seit einiger Zeit ständig folgende beiden PHPExceptions im Log:

```auto
Uncaught PHP Exception Error: "Call to a member function getSource() on null" at ApiRouteScope.php line 29 {"exception":"[object] (Error(code: 0): Call to a member function getSource() on null at /var/www/vendor/shopware/core/Framework/Routing/ApiRouteScope.php:29)"} []

```

und

`Uncaught PHP Exception InvalidArgumentException: "The controller for URI "/robots.txt" is not callable: Controller "Shopware\Storefront\Controller\RobotsController" has required constructor arguments and does not exist in the container. Did you forget to define the controller as a service?" at ControllerResolver.php line 97 {"exception":"[object] (InvalidArgumentException(code: 0): The controller for URI \"/robots.txt\" is not callable: Controller \"Shopware\\Storefront\\Controller\\RobotsController\" has required constructor arguments and does not exist in the container. Did you forget to define the controller as a service? at /var/www/domet.de/vendor/symfony/http-kernel/Controller/ControllerResolver.php:97)\n[previous exception] [object] (InvalidArgumentException(code: 0): Controller \"Shopware\\Storefront\\Controller\\RobotsController\" has required constructor arguments and does not exist in the container. Did you forget to define the controller as a service? at /var/www/domet.de/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php:49)\n[previous exception] [object] (ArgumentCountError(code: 0): Too few arguments to function Shopware\\Storefront\\Controller\\RobotsController::__construct(), 0 passed in /var/www/domet.de/vendor/symfony/http-kernel/Controller/ControllerResolver.php on line 152 and exactly 1 expected at /var/www/domet.de/vendor/shopware/storefront/Controller/RobotsController.php:21)"} []`

Wir haben den Shop aus Kundennot heraus im September übernommen und Betriebssystem und Shopware auf die aktuellste Version gebracht. Ich habe mich so gut es geht eingearbeitet aber bei manchen Themen hapert es noch.  
Der Shop läuft auf Debian 13 mit Apache, MariaDB und PHP8.4

Könnt ihr mir helfen?

Viele Grüße;  
BJ

---

<div class="post-metadata">

**Author:** ![DannyBO](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/dannybo/32/27919_2.png) [@DannyBO](https://forum.shopware.com/u/DannyBO)\
**Post date:** [28. Januar 2026 um 10:09 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/2 "2026-01-28T10:09:36Z")

</div>

stell mal die php version um wenn es geht

nach meinem wissen wird PHP8.5 erst seit SW 6.7.6.2 richtig unterstützt 🫠

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [28. Januar 2026 um 10:09 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/3 "2026-01-28T10:09:43Z")

</div>

> <https://github.com/shopware/shopware/issues/13459>
>
> \### Shopware Version
> 
> 6.7.4.0
> 
> \### Affected area / extension
> 
> Platform(Default)
> …
> \### Actual behaviour
> 
> When you try to access a robots.txt on a sales channel that has a path in its URL (i.e. https://example.com/de/robots.txt), a 500 error will be returned. The following two exceptions are logged:
> 
> \`\`\`
> Uncaught PHP Exception TypeError: "Shopware\\Storefront\\Controller\\RobotsController::robotsTxt(): Argument #2 ($context) must be of type Shopware\\Core\\Framework\\Context, null given, called in /home/mkuhlmann/files/sw6722/vendor/symfony/http-kernel/HttpKernel.php on line 183" at RobotsController.php line 26 {"exception":"\[object\] (TypeError(code: 0): Shopware\\\\Storefront\\\\Controller\\\\RobotsController::robotsTxt(): Argument #2 ($context) must be of type Shopware\\\\Core\\\\Framework\\\\Context, null given, called in /home/mkuhlmann/files/sw6722/vendor/symfony/http-kernel/HttpKernel.php on line 183 at /home/mkuhlmann/files/sw6722/vendor/shopware/storefront/Controller/RobotsController.php:26)"} \[\]
> \`\`\`
> 
> \`\`\`
> Uncaught PHP Exception Error: "Call to a member function getSource() on null" at ApiRouteScope.php line 25 {"exception":"\[object\] (Error(code: 0): Call to a member function getSource() on null at /home/mkuhlmann/files/sw6722/vendor/shopware/core/Framework/Routing/ApiRouteScope.php:25)"} \[\]
> \`\`\`
> 
> \### Expected behaviour
> 
> No error would occurr
> 
> \### How to reproduce
> 
> \- Create a sales channel with a path in its URL
> \- Try to access the robots.txt below that path

---

<div class="post-metadata">

**Author:** ![drakon](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/drakon/32/7724_2.png) [@drakon](https://forum.shopware.com/u/drakon)\
**Post date:** [28. Januar 2026 um 10:20 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/4 "2026-01-28T10:20:17Z")

</div>

SW 6.7.6.x unterstützt laut Changelog bereits PHP 8.5.  
PHP 8.4. wird bereits seit gefühlten Ewigkeiten unterstützt.

---

<div class="post-metadata">

**Author:** ![DannyBO](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/dannybo/32/27919_2.png) [@DannyBO](https://forum.shopware.com/u/DannyBO)\
**Post date:** [28. Januar 2026 um 10:22 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/5 "2026-01-28T10:22:05Z")

</div>

ups soory etwas verwechselt sorry jungs 🫠

probier mal php 8.3 aus

---

<div class="post-metadata">

**Author:** ![bjinthahouse](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bjinthahouse](https://forum.shopware.com/u/bjinthahouse)\
**Post date:** [28. Januar 2026 um 10:58 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/6 "2026-01-28T10:58:13Z")

</div>

Vielen Dank für eure Rückmeldung!

Mir war nicht klar, dass wir bereits bei Shopware 6.7 sind. Wenn ich versuche über das Webinterface zu aktualisieren, bekommen ich die Meldung “Du bist auf dem aktuellsten Stand”.

Gibt’s dafür einen bestimmten Grund?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [28. Januar 2026 um 11:11 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/7 "2026-01-28T11:11:00Z")

</div>

> [@bjinthahouse](#):
>
> Gibt’s dafür einen bestimmten Grund?

> **[Disable Auto Update for Shopware 6](https://winkelwagen.de/2021/09/16/disable-auto-update-for-shopware-6/)**
>
> You don’t want, that your shop owner updates Shopware? Shyim has you! And for easier copying, written down for you # config/packages/shopware.yml shopware: auto\_update: enabled: false

---

<div class="post-metadata">

**Author:** ![bjinthahouse](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bjinthahouse](https://forum.shopware.com/u/bjinthahouse)\
**Post date:** [28. Januar 2026 um 11:54 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/8 "2026-01-28T11:54:13Z")

</div>

Danke Max, das war tatsächlich aktiviert. Leider trotz Serverneustart, bleibt die Meldung gleich.  
Wir sind aktuell auf Version 6.6.10.6, falls das von Belang ist.

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [28. Januar 2026 um 12:16 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/9 "2026-01-28T12:16:41Z")

</div>

Cache in Shopware muss nach Änderung von YAML Dateien geleert werden. Geht über die Administration oder auf der CLI über bin/console cache:clear

Das Update auf 6.7 ist ein Breaking Update und bringt zahlreiche Änderungen sowohl in der Storefront als auch in der Administration mit sich. Sehr viele Plugins müssen dafür aktualisiert werden. Also vorab lieber in Ruhe in einer Testumgebung das Update testen.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/9/29c7587ba660f00e4995d1743162782e5d6d8653.svg) [@system](https://forum.shopware.com/u/system)\
**Post date:** [27. Februar 2026 um 12:16 UTC](https://forum.shopware.com/t/php-exception-bzgl-robots-txt/108515/10 "2026-02-27T12:16:43Z")

</div>

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.
