[SOLVED] WSOD accessing shared services in Volt template when it is compiling

When "compileAlways" is assigned to true, the white screen of death appears =/ See my example to be clarified: https://gist.github.com/romanoaugusto88/6185176

So, this is expected or is a bug? Thx

EDIT: Running Phalcon 1.2.1

Could you please update to 1.2.3 and check if the error is still there?

Of course! I tried on 1.2.3 and master branches but, continues not working. I noted that in these versions neither "setShared" or "set" methods worked this time.

I was navigating on Phalcon's issues and I think this is relationed with that: https://github.com/phalcon/cphalcon/issues/1031

After saw this, I made more tests and figure out that the problem is when a template inherits from another AND it doesn't override ALL the blocks defined in the parent AND has a component injected from Di AND "compileAlways" is assigned to true.

I updated the gist above for better understanding.



83.4k

Can you try compiling from master please?

I ensured that the commit https://github.com/phalcon/cphalcon/commit/b0c7d87134b8d64b72a8e26fda8a574dc5e603b9 was there in the pull, but the error persists =/ The difference now is I'm seeing the "502 Bad Gateway" from nginx, instead of the blank screen.

Maybe the fcgi_child is exiting after Volt compiling at now. Because, when I turn the "compileAlways" to false after failure, all works fine from cache.



83.4k

User in #1031 confirmed that the error has been solved. I added a possible fix to master, can you try again compiling from master?

\o/ I pulled from master and it works now, guys!! Thank you for support and good intentions =]