{{ my_model.my_custom_data }} ---> Twig_Error_Runtime [ Error ]: An exception has been thrown during the rendering of a template ("Call to undefined method Model_My_Model::my_custom_data()") in "my_view.twig" at line xx.
I think I used custom datas with twig before without any trouble, weird.
That's exactly my question. When I do a Debug::dump in the twig view the custom data exists in the model. It's like there was bracket, if I do {{ my_model.my_custom_data() }}, the same error is triggered. I don't understand why.
I found out the problem. The property wasn't set for one item in my model array. So when you try to access to an ORM object property which doesn't exists, twig try to call it as a method ? How can this be solved ?