Twig: Don't forget to close your tags

The error was a relatively simple error:

I couldn't figure out why it was complaining about the endblock tag. It was there and it looked correct. After much trial and error, I spotted the mistake. It was a stupid and very simple mistake: instead of {% endtrans %}, I actually had a second {% trans %}-tag in my template. Stupid! So, if you run into the exception Unknown tag name "endblock" in {}, start scanning your template for tags that haven't been properly closed. That should help you solve your problem :)