After added a relation to a collection with registerFilter(), I have an error when I would display it in a twig template:
in FlexibleEntity.php line 66
at FlexibleEntity->get('hasperson') in FlexibleEntity.php line 172
at FlexibleEntity->__call('getHasperson', array()) in FlexibleEntity.php line 307
at Expense->getHasperson() in FlexibleEntity.php line 307
at FlexibleEntity->__get('hasPerson') in FlexibleEntity.php line 323
at FlexibleEntity->__isset('person') in Template.php line 445
at Twig_Template->getAttribute(object(Expense), 'person', array()) in Environment.php(332) : eval()'d code line 95
at __TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0->block_content(array('payment' => object(Payment), 'expenses' => object(CollectionIterator), 'app' => object(Application)), array('content' => array(object(__TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0), 'block_content'))) in Template.php line 154
at Twig_Template->displayBlock('content', array('payment' => object(Payment), 'expenses' => object(CollectionIterator), 'app' => object(Application)), array('content' => array(object(__TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0), 'block_content'))) in Environment.php(332) : eval()'d code line 85
at __TwigTemplate_b3ea856be7aa361d0f7b526b094ac64b4030da4ef3c17c62d259f72192d71bfc->doDisplay(array('payment' => object(Payment), 'expenses' => object(CollectionIterator), 'app' => object(Application)), array('content' => array(object(__TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0), 'block_content'))) in Template.php line 313
at Twig_Template->displayWithErrorHandling(array('payment' => object(Payment), 'expenses' => object(CollectionIterator), 'app' => object(Application)), array('content' => array(object(__TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0), 'block_content'))) in Template.php line 287
at Twig_Template->display(array('payment' => object(Payment), 'expenses' => object(CollectionIterator), 'app' => object(Application)), array('content' => array(object(__TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0), 'block_content'))) in Environment.php(332) : eval()'d code line 24
at __TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0->doDisplay(array('payment' => object(Payment), 'expenses' => object(CollectionIterator), 'app' => object(Application)), array('content' => array(object(__TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0), 'block_content'))) in Template.php line 313
at Twig_Template->displayWithErrorHandling(array('payment' => object(Payment), 'expenses' => object(CollectionIterator), 'app' => object(Application)), array('content' => array(object(__TwigTemplate_534e5c8457df35cd1a95d77a02b43fdd4dc961b9ca93e8d94599b8886d1158a0), 'block_content'))) in Template.php line 287
at Twig_Template->display(array('payment' => object(Payment), 'expenses' => object(CollectionIterator))) in Template.php line 298
at Twig_Template->render(array('payment' => object(Payment), 'expenses' => object(CollectionIterator))) in Environment.php line 293
at Twig_Environment->render('payment/edit.html.twig', array('payment' => object(Payment), 'expenses' => object(CollectionIterator))) in Payment.php line 101
at Payment->editPayment(object(Application), '-1')
at call_user_func_array(array(object(Payment), 'editPayment'), array(object(Application), '-1')) in HttpKernel.php line 145
at HttpKernel->handleRaw(object(Request), '2') in HttpKernel.php line 66
at HttpKernel->handle(object(Request), '2', true) in Application.php line 547
at Application->handle(object(Request), '2') in Payment.php line 57
at Payment->addPayment(object(Application))
at call_user_func_array(array(object(Payment), 'addPayment'), array(object(Application))) in HttpKernel.php line 145
at HttpKernel->handleRaw(object(Request), '1') in HttpKernel.php line 66
at HttpKernel->handle(object(Request), '1', true) in Application.php line 547
at Application->handle(object(Request)) in Application.php line 524
at Application->run() in index.php line 12
I maybe made something wrong, but I have no error with pomm1.
After added a relation to a collection with
registerFilter()
, I have an error when I would display it in a twig template:I maybe made something wrong, but I have no error with pomm1.
https://github.com/sanpii/coloc/blob/pomm2/src/Controller/Expenses.php#L49