# Add custom page Dokumentation: Too few arguments

**URL:** <https://forum.shopware.com/t/add-custom-page-dokumentation-too-few-arguments/88072>\
**Category:** Programmierung\
**Tags:** programming\
**Created:** [2. Juni 2021 um 10:28 UTC](https://forum.shopware.com/t/add-custom-page-dokumentation-too-few-arguments/88072 "2021-06-02T10:28:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RBK](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@RBK](https://forum.shopware.com/u/RBK)\
**Post date:** [2. Juni 2021 um 10:28 UTC](https://forum.shopware.com/t/add-custom-page-dokumentation-too-few-arguments/88072/1 "2021-06-02T10:28:05Z")

</div>

Hallo zusammen,   
die Umsetzung eines Plugins für eine Custom Page nach Dokumentation „[Add custom page](https://developer.shopware.com/docs/guides/plugins/plugins/storefront/add-custom-page)“ endet im Fehler:  
 **Too few arguments to function […]\_\_construct(), 0 passed and exactly 1 expected**.  
  
Selbst bei der 1:1-Umsetzung des SwagBasicExample-Beispiels inkl. Custom Controller und Custom Complex Data ist das Ergebnis der Fehler  
  
**# Too few arguments to function Swag\BasicExample\Storefront\Controller\ExampleController::\_\_construct(), 0 passed in /var/www/shopware/var/cache/dev\_h8ba8e08eeec6bda8d9f704fe627d4ff4/ContainerKUXlXAl/Shopware\_Production\_KernelDevDebugContainer.php on line 9202 and exactly 1 expected**  
  
  
Meine Hoffnung ist, dass es eine ähnlich einfache Lösung wie von @shyim in [diesem Fall](https://forum.shopware.com/t/add-data-to-a-store-front-page-entityrepositoryinterface-too-few-arguments-to-function/63744) gibt; allerdings bin ich nach Stunden der Recherche noch nicht auf den Fehler gestoßen.  
 Ich danke Euch vorab  
  
_Wichtige Info: **Wir laufen auf 6.4.0.0** _

---

<div class="post-metadata">

**Author:** ![JohnWink](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@JohnWink](https://forum.shopware.com/u/JohnWink)\
**Post date:** [17. Juli 2021 um 17:21 UTC](https://forum.shopware.com/t/add-custom-page-dokumentation-too-few-arguments/88072/2 "2021-07-17T17:21:08Z")

</div>

Hallo 🙂  
du musst in der services.xml zum Controller Service noch das Argument mit dem PageLoader übergeben ungefähr so:

```auto
<argument type="service" id="HIER KOMMT DIE ID VOM PAGELOADER SERVICE REIN"></argument>

```

Dann sollte es funktionieren.

Beste Grüße  
John Wink
