The learning curve is pretty steep here, but I still moving a little every day. Please help.
I've created a new type and template. But, when I use createphp, it seems that the cmfMainContent is a Controller instead of my Biography object. Does anybody has a clue on why?
Even if I use the same objetct in another place (a listing on other template), it works ok.
The template, rdf-mapping and everything else seems very similar to the page template:
<h1 {{ createphp_attributes( rdf.fullName ) }}>{{ cmfMainContent.fullName }}</h1>
<div id="main-content" {{ createphp_attributes(rdf.body) }}>{{ cmfMainContent.body|raw }}</div>
[1] Twig_Error_Runtime: Method "fullName" for object "Midgard\CreatePHP\Entity\Controller" does not exist in "DbuConferenceBundle:Page:biography.html.twig" at line 9
at n/a
in /var/www/sms/app/cache/dev/classes.php line 4528
at Twig_Template->getAttribute(object(Controller), 'fullName')
in /var/www/sms/app/cache/dev/twig/85/4f/77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c.php line 46
at __TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c->block_content(array('cmfMainContent' => object(Biography), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables)), array('stylesheets' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_stylesheets'), 'header' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_header'), 'content' => array(object(__TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c), 'block_content'), 'footer' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_footer')))
in /var/www/sms/app/cache/dev/classes.php line 4373
at Twig_Template->displayBlock('content', array('cmfMainContent' => object(Biography), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables)), array('stylesheets' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_stylesheets'), 'header' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_header'), 'content' => array(object(__TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c), 'block_content'), 'footer' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_footer')))
in /var/www/sms/app/cache/dev/twig/9f/b2/516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de.php line 208
at __TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de->doDisplay(array('cmfMainContent' => object(Biography), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables)), array('stylesheets' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_stylesheets'), 'header' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_header'), 'content' => array(object(__TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c), 'block_content'), 'footer' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_footer')))
in /var/www/sms/app/cache/dev/classes.php line 4428
at Twig_Template->displayWithErrorHandling(array('cmfMainContent' => object(Biography), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables)), array('stylesheets' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_stylesheets'), 'header' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_header'), 'content' => array(object(__TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c), 'block_content'), 'footer' => array(object(__TwigTemplate_9fb2516888dd12616e575f48ab6c372cc0c2a7932f1849948e72d51c683dc1de), 'block_footer')))
in /var/www/sms/app/cache/dev/classes.php line 4409
at Twig_Template->display(array('cmfMainContent' => object(Biography), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables)), array('content' => array(object(__TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c), 'block_content')))
in /var/www/sms/app/cache/dev/twig/85/4f/77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c.php line 24
at __TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c->doDisplay(array('cmfMainContent' => object(Biography), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables)), array('content' => array(object(__TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c), 'block_content')))
in /var/www/sms/app/cache/dev/classes.php line 4428
at Twig_Template->displayWithErrorHandling(array('cmfMainContent' => object(Biography), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables)), array('content' => array(object(__TwigTemplate_854f77096f681242370b37c75ef55e7a8ebce988e3dc5648071d8ba88bc8004c), 'block_content')))
in /var/www/sms/app/cache/dev/classes.php line 4409
at Twig_Template->display(array('cmfMainContent' => object(Biography)))
in /var/www/sms/app/cache/dev/classes.php line 4416
at Twig_Template->render(array('cmfMainContent' => object(Biography)))
in /var/www/sms/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php line 53
at Symfony\Bridge\Twig\TwigEngine->render('DbuConferenceBundle:Page:biography.html.twig', array('cmfMainContent' => object(Biography)))
in /var/www/sms/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php line 83
at Symfony\Bundle\TwigBundle\TwigEngine->render('DbuConferenceBundle:Page:biography.html.twig', array('cmfMainContent' => object(Biography)))
in /var/www/sms/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Debug/TimedTwigEngine.php line 50
at Symfony\Bundle\TwigBundle\Debug\TimedTwigEngine->render('DbuConferenceBundle:Page:biography.html.twig', array('cmfMainContent' => object(Biography)))
in /var/www/sms/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/View/ViewHandler.php line 370
at FOS\RestBundle\View\ViewHandler->renderTemplate(object(View), 'html')
in /var/www/sms/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/View/ViewHandler.php line 439
at FOS\RestBundle\View\ViewHandler->initResponse(object(View), 'html')
in /var/www/sms/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/View/ViewHandler.php line 418
at FOS\RestBundle\View\ViewHandler->createResponse(object(View), object(Request), 'html')
in /var/www/sms/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/View/ViewHandler.php line 311
at FOS\RestBundle\View\ViewHandler->handle(object(View))
in /var/www/sms/vendor/symfony-cmf/content-bundle/Symfony/Cmf/Bundle/ContentBundle/Controller/ContentController.php line 105
at Symfony\Cmf\Bundle\ContentBundle\Controller\ContentController->renderResponse('DbuConferenceBundle:Page:biography.html.twig', array('cmfMainContent' => object(Biography)))
in /var/www/sms/vendor/symfony-cmf/content-bundle/Symfony/Cmf/Bundle/ContentBundle/Controller/ContentController.php line 88
at Symfony\Cmf\Bundle\ContentBundle\Controller\ContentController->indexAction(object(Request), object(Biography), 'DbuConferenceBundle:Page:biography.html.twig')
in line
at call_user_func_array(array(object(ContentController), 'indexAction'), array(object(Request), object(Biography), 'DbuConferenceBundle:Page:biography.html.twig'))
in /var/www/sms/app/bootstrap.php.cache line 2872
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
in /var/www/sms/app/bootstrap.php.cache line 2846
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
in /var/www/sms/app/bootstrap.php.cache line 2975
at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
in /var/www/sms/app/bootstrap.php.cache line 2255
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
in /var/www/sms/web/app_dev.php line 28