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 currently working on the developer bootcamp. I’m currently stuck trying to solve “Conten
Hello,
I’m currently working on the developer bootcamp. I’m currently stuck trying to solve “Content and Search-Hands-On”. I created the module and can access the generated page. After I added the functionality to get the query from elasticsearch im getting a 500 internal server error.
My question is, how can I see the actual error message that leads to this response? Furthermore, when I make changes to the twig templates the changes are only shown after I clear the cache is this intended behaviour?
Comments
-
hey
0 -
i assume you are using the docker environment?
0 -
Yes i am
0 -
for the exception you have to swap out the
WebHtmlRenderer
(or so, can’t check since i am on train atm) with theWebExceptionRenderer
(or so 🙂 ) inconfig_default-docker.php
0 -
somewhere there you can also disable the twig cache
0 -
...another good option is to setup debugging using the Docker environment so you can step through the process. When working on this module I initially had a mistake in the naming of my
DependencyProvider
which meant aContainer
could not be found for my module.0 -
Also, don't be fooled by your Browser. Using Safari I've had instances where the Twig cache was refreshed but my Browser kept serving me static content.
0 -
@UJN2JRU4F Thanks changing the option to WebExceptionRenderer worked. I didn’t find the option to change the twig chache yet, but I will take a closer look at the config
0 -
glad to help. can look it up in about 2h! let me know what you find
0 -
@UQ958DA4U can you elaborate on what you mean by enabling debugging in the docker environment? I’m using chrome at the moment and am refreshing the pages with cache disabled
0 -
-
@UJN2JRU4F I’ll let you know when I find something
0 -
The link above will allow you to set breakpoints in your code and watching for variable changes etc. Words of caution though:
... run -x
never worked for me. I needed to use... up -x
, even when my other containers were already running.0 -
This also requires an Xdebug browser plugin in order to activate the breakpoints.
0 -
@UQ958DA4U ok thanks I’ll have a look at it
0 -
This finally lead me to the path where I could see that
NULL
was returned for theContainer
instance. Otherwise yes, twig caches seem to be needed to be refreshed often. If you find a disabling option I'd be interested, too!0 -
it should actually be fairly straight forward, let me see what my train wifi allows me to do atm
0 -
from the
devtest
config, this seems to do the trick:0 -
yes
0 -
in docker there is a bit of duplication, so basically every config value is again in
config_default-docker.pph
0 -
for me on line ~104
0 -
0
-
dito
0 -
and line 360 for yves. setting
'cache' => false
, as @UQ958DA4U showed above for those two should disable the cache0 -
That worked perfectly. Thanks again for the help
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 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
- 25 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