# Unable to load template file 'frontend/error/index.tpl|frontend/exception.tpl'

**URL:** <https://forum.shopware.com/t/unable-to-load-template-file-frontend-error-index-tpl-frontend-exception-tpl/87350>\
**Category:** Shopware 5\
**Created:** [4. Mai 2021 um 05:28 UTC](https://forum.shopware.com/t/unable-to-load-template-file-frontend-error-index-tpl-frontend-exception-tpl/87350 "2021-05-04T05:28:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)\
**Post date:** [4. Mai 2021 um 05:28 UTC](https://forum.shopware.com/t/unable-to-load-template-file-frontend-error-index-tpl-frontend-exception-tpl/87350/1 "2021-05-04T05:28:45Z")

</div>

Hallo.

Wir sind so langsam am verzweifeln. Bei einen Kundenshop (SW 5.5.3) gab es sporadisch eine SmartyException Unable to load template file. Es wurden insgesamt 4 Templates aufgelistet. 2 davon waren von einem Drittanbieter Plugin. Wir haben darauf hin das Plugin deinstalliert und durch ein anderes ersetzt. Jetzt tritt der Fehler sogar noch häufiger auf. Es kommt zu einem 500er sobald der Checkout aufgerufen wird. Verkäufe sind somit nicht mehr möglich und es geht Umsatz verloren. Nach dem Leeren des Shopware Caches funktioniert es wieder für eine gewisse Zeit…

Aufgelistet sind jetzt nur noch 2 Templates welche im SW Core enthalten sind und auch physisch da sind… Was läuft hier schief? Wie können wir herausfinden wo genau das Problem liegt? Würde evtl. ein SW Update etwas bringen?

Stack:  
[04-May-2021 07:22:09 Europe/Berlin] PHP Fatal error: Uncaught SmartyException: Unable to load template file ‚frontend/error/index.tpl|frontend/exception.tpl‘ in /home/jnspaynu/jns/engine/Library/Smarty/sysplugins/smarty\_internal\_templatebase.php:127  
Stack trace:  
#0 /home/jnspaynu/jns/engine/Library/Enlight/View/Default.php(300): Smarty\_Internal\_TemplateBase-\>fetch()  
#1 /home/jnspaynu/jns/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(216): Enlight\_View\_Default-\>render(Object(Enlight\_Template\_Default))  
#2 /home/jnspaynu/jns/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(242): Enlight\_Controller\_Plugins\_ViewRenderer\_Bootstrap-\>renderTemplate(Object(Enlight\_Template\_Default))  
#3 /home/jnspaynu/jns/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(136): Enlight\_Controller\_Plugins\_ViewRenderer\_Bootstrap-\>render()  
#4 /home/jnspaynu/jns/engine/Library/Enlight/Event/Handler/Default.php(91): Enlight\_Controller\_Plugins\_ViewRenderer\_Bootstrap-\>onPostDispatch(Object(Enl in /home/jnspaynu/jns/engine/Library/Smarty/sysplugins/smarty\_internal\_templatebase.php on line 127

Gruß Mike

---

<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:** [4. Mai 2021 um 07:54 UTC](https://forum.shopware.com/t/unable-to-load-template-file-frontend-error-index-tpl-frontend-exception-tpl/87350/2 "2021-05-04T07:54:34Z")

</div>

Schon in Betracht gezogen den Shop mal auf aktuellen Stand zu bringen?

---

<div class="post-metadata">

**Author:** ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)\
**Post date:** [4. Mai 2021 um 08:10 UTC](https://forum.shopware.com/t/unable-to-load-template-file-frontend-error-index-tpl-frontend-exception-tpl/87350/3 "2021-05-04T08:10:13Z")

</div>

Ja schon länger. Hängt viel dran deshalb hat der Kunde bis jetzt geschoben. Wird jetzt aber wohl kommen. Trotzdem eine Idee wieso der Fehler auftritt?

---

<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:** [4. Mai 2021 um 08:24 UTC](https://forum.shopware.com/t/unable-to-load-template-file-frontend-error-index-tpl-frontend-exception-tpl/87350/4 "2021-05-04T08:24:38Z")

</div>

Fehler wie ‚frontend/error/index.tpl‘ hatte ich schon oft in Verbindung mit Plugins. Teilweise waren die nicht aktuellen Stand. Da eure Tempaltes wohl auch als Plugin laufen, würde ich mal im Template Verzeichnis prüfen ob dort eine frontend/error/index.tpl liegt. Irgendetwas versucht hier auf so ein File zu zugreifen. Ansonsten diese Datei mal dort anlegen und schauen was passiert.

> <https://github.com/shopware/shopware/blob/5.7/themes/Frontend/Bare/frontend/error/index.tpl>

Alternativ auch mal im Server Log schauen (nicht Shopware Log) ob dort noch weitere Infos zum 500er Error stehen - meist ist das der Fall.

---

<div class="post-metadata">

**Author:** ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)\
**Post date:** [4. Mai 2021 um 08:56 UTC](https://forum.shopware.com/t/unable-to-load-template-file-frontend-error-index-tpl-frontend-exception-tpl/87350/5 "2021-05-04T08:56:20Z")

</div>

hey danke für dein Feedback. Wir haben die error/index.tpl jetzt mal im Theme-Plugin ergänzt. Fehler trat danach nochmal auf. Uns ist jetzt aber noch etwas aufgefallen. Im Shop ist das Swag Security Plugin 1.1.21 aktiv. In der Bootstrap.php wird in Zeile 599 folgendes ausgeführt:  
$subject-\>View()-\>extendsTemplate(‚frontend/exception.tpl‘);

Im Core Filesystem gibt es die exception.tpl allerdings nur in frontend/error/exception.tpl und nicht in frontend/exception.tpl. Diese liegt nur im Security Plugin direkt in frontend. Vielleicht führt das zum Fehler das der Subscriber auf Enlight\_Controller\_Action\_PostDispatch\_Frontend\_Error sitzt… Wir haben das Template jetzt mal im Theme Plugin unter frontend/ abgelegt. Bin gespannt ob der Fehler jetzt dadurch behoben ist. Melde ich mich wieder.

Auszug oben war schon aus dem generellen PHP Error Log

Gruß Mike

---

<div class="post-metadata">

**Author:** ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)\
**Post date:** [4. Mai 2021 um 09:25 UTC](https://forum.shopware.com/t/unable-to-load-template-file-frontend-error-index-tpl-frontend-exception-tpl/87350/6 "2021-05-04T09:25:56Z")

</div>

☹ Fehler ist nach wie vor da… In den Shopware Logs wird nichts ausgegeben
