Expected an identifier and instead saw '<'. - Wie die Ursache finden?

Hallo Community,

ich habe einen Shop, der mir bei einigen Plugins folgenden Fehler im Backend wirft. Wie kann ich die Ursache finden? Ich habe bereits alle Standard-Dateien neu hochgeladen, Kundendaten gelöscht und alle anderen Plugins deaktiviert. Das Problem tritt anscheinend auf, wenn ein Plugin das Backend erweitert. Es liegt nicht am Plugin. In meiner Entwicklungsumbeung und 1000 anderen Shops, laufen die Plugins problemlos. Ich habe auch andere PHP Versionen getestet und natürlich die Fehlerausgabe aktiviert. Ich komme jetzt aber nicht mehr weiter.
Wie finde ich das eigentlich Problem? Hilfe!

Expected an identifier and instead saw ‚<‘.
Missing „;“ before statement
Expected an identifier and instead saw ‚<‘.

<h2><span class="frontend_error_exception">Ups! An error has occurred!</span></h2>
<p>
<span class="frontend_error_exception">The following hints should help you.</span>
</p>
<h3>Unable to load template snippet &#039;string:{include file=&amp;quot;backend/customer/model/customer.js&amp;quot;}
{include file=&amp;quot;backend/customer/model/debit.js&amp;quot;}
{include file=&amp;quot;backend/customer/model/payment_data.js&amp;quot;}
{include file=&amp;quot;backend/customer/model/order.js&amp;quot;}
{include file=&amp;quot;backend/customer/model/chart.js&amp;quot;}
{include file=&amp;quot;backend/customer/model/batch.js&amp;quot;}
{include file=&amp;quot;backend/customer/model/address.js&amp;quot;}
{include file=&amp;quot;backend/customer/model/quick_view.js&amp;quot;}
{include file=&amp;quot;backend/customer/model/customer_stream.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/main/quick_view.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/main/stream_view.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/main/customer_list.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/main/customer_list_filter.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/main/window.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/main/wizard.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/detail/window.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/detail/base.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/detail/debit.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/detail/comment.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/detail/additional.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/order/list.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/order/chart.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/address/list.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/address/detail/window.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/address/detail/address.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/chart/amount_chart_factory.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/chart/chart.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/chart/meta_chart.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/detail.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/listing.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/preview.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/condition_panel.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/condition_field.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/account_mode_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/age_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/has_address_with_country_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/has_canceled_orders_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/has_no_canceled_orders_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/has_newsletter_registration_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/has_no_newsletter_registration_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/is_customer_since_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/is_in_customer_group_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/is_not_in_customer_group_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/has_order_count_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_at_weekday_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_in_last_days_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_ordered_in_last_days_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_in_shop_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_ordered_in_shop_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/registered_in_shop_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_registered_in_shop_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_on_device_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_product_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_ordered_product_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_product_of_category_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_ordered_product_of_category_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_product_of_manufacturer_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_ordered_product_of_manufacturer_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_with_delivery_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_ordered_with_delivery_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/ordered_with_payment_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_ordered_with_payment_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/has_total_order_amount_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/customer_attribute_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/salutation_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/not_salutation_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/search_term_condition.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/field/attribute_value.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/field/attribute_window.js&amp;quot;}
{include file=&amp;quot;backend/customer/view/customer_stream/conditions/field/operator_field.js&amp;quot;}
{include file=&amp;quot;backend/customer/store/detail.js&amp;quot;}
{include file=&amp;quot;backend/customer/store/orders.js&amp;quot;}
{include file=&amp;quot;backend/customer/store/chart.js&amp;quot;}
{include file=&amp;quot;backend/customer/store/batch.js&amp;quot;}
{include file=&amp;quot;backend/customer/store/address.js&amp;quot;}
{include file=&amp;quot;backend/customer/store/quick_view.js&amp;quot;}
{include file=&amp;quot;backend/customer/store/preview.js&amp;quot;}
{include file=&amp;quot;backend/customer/store/customer_stream.js&amp;quot;}
{include file=&amp;quot;backend/customer/controller/detail.js&amp;quot;}
{include file=&amp;quot;backend/customer/controller/order.js&amp;quot;}
{include file=&amp;quot;backend/customer/controller/main.js&amp;quot;}
{include file=&amp;quot;backend/customer/controller/stream.js&amp;quot;}|backend/customer/plugin-name/view/detail/window.js&#039; in /home/xyz/meine-domain.de/testshop/engine/Library/Smarty/sysplugins/smarty_internal_templatebase.php on line 127</h3>
<h3>Stack trace:</h3>
<div style="overflow:auto;">
<pre>#0 /home/xyz/meine-domain.de/testshop/engine/Library/Enlight/View/Default.php(286): Smarty_Internal_TemplateBase-&gt;fetch()
#1 /home/xyz/meine-domain.de/testshop/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(180): Enlight_View_Default-&gt;render()
#2 /home/xyz/meine-domain.de/testshop/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(207): Enlight_Controller_Plugins_ViewRenderer_Bootstrap-&gt;renderTemplate()
#3 /home/xyz/meine-domain.de/testshop/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(124): Enlight_Controller_Plugins_ViewRenderer_Bootstrap-&gt;render()
#4 /home/xyz/meine-domain.de/testshop/engine/Library/Enlight/Event/Handler/Default.php(90): Enlight_Controller_Plugins_ViewRenderer_Bootstrap-&gt;onPostDispatch()
#5 /home/xyz/meine-domain.de/testshop/custom/plugins/FroshProfiler/Components/Event/EventManager.php(299): Enlight_Event_Handler_Default-&gt;execute()
#6 /home/xyz/meine-domain.de/testshop/custom/plugins/FroshProfiler/Components/Event/EventManager.php(84): FroshProfiler\Components\Event\EventManager-&gt;parentNotify()
#7 /home/xyz/meine-domain.de/testshop/engine/Library/Enlight/Controller/Action.php(228): FroshProfiler\Components\Event\EventManager-&gt;notify()
#8 /home/xyz/meine-domain.de/testshop/engine/Library/Enlight/Controller/Dispatcher/Default.php(467): Enlight_Controller_Action-&gt;dispatch()
#9 /home/xyz/meine-domain.de/testshop/engine/Library/Enlight/Controller/Front.php(225): Enlight_Controller_Dispatcher_Default-&gt;dispatch()
#10 /home/xyz/meine-domain.de/testshop/engine/Shopware/Kernel.php(197): Enlight_Controller_Front-&gt;dispatch()
#11 /home/xyz/meine-domain.de/testshop/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\Kernel-&gt;handle()
#12 /home/xyz/meine-domain.de/testshop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
#13 /home/xyz/meine-domain.de/testshop/engine/Shopware/Components/HttpCache/AppCache.php(266): Symfony\Component\HttpKernel\HttpCache\HttpCache-&gt;forward()
#14 /home/xyz/meine-domain.de/testshop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(269): Shopware\Components\HttpCache\AppCache-&gt;forward()
#15 /home/xyz/meine-domain.de/testshop/engine/Shopware/Components/HttpCache/AppCache.php(106): Symfony\Component\HttpKernel\HttpCache\HttpCache-&gt;pass()
#16 /home/xyz/meine-domain.de/testshop/shopware.php(122): Shopware\Components\HttpCache\AppCache-&gt;handle()
#17 {main}</pre>
</div>
<div class="doublespace">&nbsp;</div>

Gruß
Marco

Das sieht nach einem Fehler beim Parsen von Javascript aus, vermutlich enthält eine der JS Dateien HTML-Code. Drück mal im Browser F12, eigentlich müsstest du die Stelle an der das passiert in den Dev Tools in der Console sehen.

LG Phil

Hey @phil,

in der Console steht leider auch keine andere Meldung. Ich habe bereits alle Shopware Dateien getauscht und nur das Plugin aktiviert, welches die Kunden erweitert. Am Plugin liegts nicht und Cache ist auch mehrfach gelöscht.
Hast du eine Idee, wie ich die defekte Datei noch finden könnte?

Danke und Gruß
Marco

Kann nicht wirklich helfen. Hatte mal sowas Ähnliches. Das Problem trat jedoch im Inkognito-Modus nicht auf. Also irgendetwas mit Cookies / Caches / Sessions in meinem Fall.

Könnte auch ein Fehler in den Textbausteinen sein, diese werden ja mit inkludiert. Das ist natürlich ein wenig Suche nach der Nadel im Heuhaufen…

LG Phil

Ich habe das gleiche Problem auch von Zeit zu Zeit. Wenn ich dann den Cache leere, ist alles wieder gut. Die Ursache konnte ich bislang leider auch nicht herausfinden.

Die Textbausteine habe ich auch schon getestet. Ein Problem konnte ich schnell aussließen, indem ich einfach die Tabelle geleert habe. :wink:
Bei einer Neuinstallation tritt das Problem nicht auf, somit kann es schon mal nicht am Server liegen.

Prüfe zunächst mal im Backend unter Einstellungen > Systeminfo > Shopware-Dateien, ob alle Files ein grünes Häkchen haben. Dann würde ich testweise mal auf Standard-Theme (Responsive) gehen. Alle Caches löschen und alles neu kompilieren. Wenn der Fehler dann immer noch auftritt, bleibt dir nur die Plugins nacheinander zu deaktivieren, um den Fehler weiter einzugrenzen.

LG Phil