0

When I develop templates in Sulu 1.6 and an error occurs, where can I find the full error or exact error location? Is there some kind of special log or do I need to change the default location?

The corresponding /admin/websocket/admin response contains only this (basically the same information):

{
   "handler":"sulu_preview.preview",
   "message":{
     "code":9903,
     "message":"Unclosed \"block\".",
     "type":"Sulu\\Bundle\\PreviewBundle\\Preview\\Exception\\TwigException"
   },
   "options":[],
   "error":true
} 

Currently I only see messages like this: Not very helpful template error

It would be also helpful to know, where the catch block for this is, in case it is not jet implemented.

Thx a lot!

Andreas
  • 1,691
  • 1
  • 15
  • 34
  • the catch block for this is located here: https://github.com/sulu/sulu/blob/master/src/Sulu/Bundle/PreviewBundle/Preview/Renderer/PreviewRenderer.php#L193 – Johannes Wachter Jan 11 '19 at 06:31
  • currently there is no special log implemented. i there any information in the response of the preview update? – Johannes Wachter Jan 11 '19 at 06:35
  • Hi @Johannes Wachter, unfortunately the response provides also not the file and line number of the error. I updated the question with an admin socket response example, – Andreas Jan 11 '19 at 11:55

1 Answers1

2

So it turned out, that there is no logging enabled, and because the PreviewRendere throws a new Exception, the original information is pretty much lost. It can be added in this way: https://github.com/sulu/sulu/pull/4363

Best wishes
Andreas

Andreas
  • 1,691
  • 1
  • 15
  • 34