Tutorial von Udemy

Hallo,

 

ich habe das Einsteigsvideotutorial gemacht und bin nun beim Advanced.

Ich bin im Kapitel 4 Video 14.

Ich habe das Tutorial von SwagBundle5 gemacht und nun auch das fertige von 6 herunter geladen, ich habe eine weiße Seite, wenn ich auf einer Kategorieseite bin. Wo ist der Fehler?

Gibt es eine Fehlermeldung im Shopware-Log oder im Error-Log der Website?

Timme Hosting - schnelles nginx-Hosting

www.timmehosting.de

Ich hatte das Fehlerlog an, da kam nichts, aber scheinbar war auch dort etwas stehen geblieben. Heute hatte ich nochmal alles neugestartet, dann kam zuerst:

 

[Mon Jul 15 08:37:17.557546 2019] [php7:notice] [pid 9672] [client 127.0.0.1:34222] PHP Fatal error:  Uncaught SmartyCompilerException: Syntax Error in template „/var/www/html/shopware_fortgeschritten/themes/Frontend/Bare/frontend/index/index.tpl“  on line 7 „<html class=„no-js“ lang=“{s name=‚IndexXmlLang‘}{/s}" itemscope=„itemscope“ itemtype="http://schema.org/WebPage">" unknown tag „s“ in /var/www/html/shopware_fortgeschritten/engine/Library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php:657\nStack trace:\n#0 /var/www/html/shopware_fortgeschritten/engine/Library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php(443): Smarty_Internal_TemplateCompilerBase->trigger_template_error(‚unknown tag „s“‘, 7)\n#1 /var/www/html/shopware_fortgeschritten/engine/Library/Smarty/sysplugins/smarty_internal_templateparser.php(2388): Smarty_Internal_TemplateCompilerBase->compileTag(‚s‘, Array)\n#2 /var/www/html/shopware_fortgeschritten/engine/Library/Smarty/sysplugins/smarty_internal_templatepar in /var/www/html/shopware_fortgeschritten/engine/Library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 657, referer: http://localhost/shopware_fortgeschritten/

 

Danach hatte ich gesucht, dann stand da ich solle mal den Cache von Shopware löschen und dann kam die nächste Fehlermeldung.

 

[Mon Jul 15 08:48:49.550128 2019] [php7:notice] [pid 9673] [client 127.0.0.1:35204] PHP Fatal error:  Uncaught Error: Class ‚SwagAdvDevBundle5\Bundle\StoreFrontBundle\Bundle‘ not found in /var/www/html/shopware_fortgeschritten/custom/plugins/SwagAdvDevBundle5/Bundle/StoreFrontBundle/BundleService.php:71\nStack trace:\n#0 /var/www/html/shopware_fortgeschritten/custom/plugins/SwagAdvDevBundle5/Bundle/StoreFrontBundle/BundleService.php(52): SwagAdvDevBundle5\Bundle\StoreFrontBundle\BundleService->getBundlesByProductId(14)\n#1 /var/www/html/shopware_fortgeschritten/custom/plugins/SwagAdvDevBundle5/Bundle/StoreFrontBundle/ListProductServiceDecorator.php(43): SwagAdvDevBundle5\Bundle\StoreFrontBundle\BundleService->getProductBundles(14, Object(Shopware\Bundle\StoreFrontBundle\Struct\ShopContext))\n#2 /var/www/html/shopware_fortgeschritten/engine/Shopware/Bundle/SearchBundle/ProductSearch.php(67): SwagAdvDevBundle5\Bundle\StoreFrontBundle\ListProductServiceDecorator->getList(Array, Object(Shopware\Bundle\StoreFrontBundle\Struct\ShopContext))\n#3 /var/www/html/shopware_fortgeschritten/engine/Shopware/Bundle/SearchBundle/V in /var/www/html/shopware_fortgeschritten/custom/plugins/SwagAdvDevBundle5/Bundle/StoreFrontBundle/BundleService.php on line 71, referer: http://localhost/shopware_fortgeschritten/

 

Habe den Fehler nun gefunden.

 

In der Bundle/BundleService.php war ein Fehler in Zeile 71

foreach ($result as $row) {
            $bundle = new Struct\Bundle();

            $bundle->setId($row['id']);
            $bundle->setName($row['name']);

            $bundles[] = $bundle;

        }

In der Zeile, wo man $bundle = new Bundle(); aufruft, muss noch der übergeordnete Ordner mit eingetragen werden, dann geht es.

Wie ist die Lösung von dem Advanced Beispiel?