What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello! I'm having trouble working through the Bootcamp and am hoping someone can help me. I'm tryi
Hello! I'm having trouble working through the Bootcamp and am hoping someone can help me. I'm trying to complete the HelloSpryker lesson. I have written all the PHP and twig files per the instructions. When I browse to "http://www.de.b2b-demo-shop.local/en/hello-spryker" I get the error: Twig\Error\LoaderError - Template "@HelloSpryker/index/index.twig" is not defined (Spryker\Shared\Twig\TwigFilesystemLoader: Unable to find template "index/index.twig" (looked into: /data/shop/development/current/src/Pyz/Yves/HelloSpryker/Theme/default).).
The index.twig file exists in "/data/shop/development/current/src/Pyz/Yves/HelloSpryker/Theme/default/views/index" but from the error message it looks like Spryker is looking for "index/index.twig" instead of "views/index/index.twig". Does anyone have any ideas on how to fix this or what I might be doing wrong?
I'm using Vagrant on macOS per the instructions here: https://documentation.spryker.com/v4/docs/installation-guide-b2b
Thanks in advance!
Comments
-
Hi @U01A958FBGQ, there are two ways to solve that:
1. Use@HelloSpryker/views/index/index.twig
in your controller
2. Move the file fromTheme/default/views/index/index.twig
toTheme/default/index/index.twig
0 -
You can also look how this is handled in other places:
0 -
I stumbled in the same spot in the Bootcamp. It think this should be corrected.
0 -
0
-
Thanks for the help on this! Removing the views folder from the index.twig path did the trick. I did also run into a subsequent issue saying that "_view" does not exist in index.twig but I think I can edit that out and proceed with the bootcamp. Thanks again!
0 -
@U018XELUZS9, I just looked again at your response and while removing "views" from the file path did fix the issue, I've always had
@HelloSpryker/views/index/index.twig
as the line in my controller. It's as though the "views" part of my controller string is being ignored. Any advice or ideas?0 -
i will have another look at this later. theoretically it should work as is (and has ever since), with our without ‘views’, depending on what you put in the controller.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random