"500" on dev env errors

Hi for all. I’m new in Roots stack. VERY good piece of sotware & community, guys. Amazing job!

My doubt today is about Sage. In dev env, when some error occours, I’m getting just a 500 error (I can simulate that just removing a “;”, for example); it’s impossible to see the renderization of the page itself neither some meaningfull message about the error.

There’s some config I missed?

Best regards.

1 Like

Have you checked your PHP logs?

Sorry, I think I didn’t express myself very clearly.

I know what the problem is (in the example, I just remove the “;” from a line); the question is: in Roots stack, when there’s some code error, it’s supose to see this error in any friendly way in screen instead get a 500 error and we need to check the logs?

Regards,

Hey @tarciozemel,

Have you set WP_DEBUG to true? If you’re using just Sage, try setting that in your wp-config.php file. If you’re using Bedrock, I believe it should be enabled by default when WP_ENV=development if you’re using the development config file that’s included.

Hi there! When you say Roots stack, do you also mean that you’re using Trellis? See:

https://roots.io/trellis/docs/server-logs/

Hey @mmirus & @ben,

Yeah, I’m using Trellis + Bedrock + Sage. :slight_smile:

Indeed, in site/config/environments/development.php, there’s a Config::define('WP_DEBUG', true); definition. Since I cloned the repo a while ago, I have missed the c457082 change. With this new directive, now it’s possible to better identify the errors cause.

Thank you guys.

2 Likes