secret
Created

Hi, getting a MissingTranslationException when for displaying a banner on the frontend. It is caused in the refreshDocumentForProxy method on line 496 of UOW. The banner block is not translated and the banner images are (title and description property).

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
[1/2] MissingTranslationException: No translation at '/pages/partners/partner_worden/main_top/image1' found with strategy 'child using the default locale 'nl'.
in ../website/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php at line 2606
$localeUsed = $this->dm->getLocaleChooserStrategy()->getDefaultLocale();
if (!$strategy->loadTranslation($document, $node, $metadata, $localeUsed)) {
$msg = "No translation at '{$node->getPath()}' found with strategy '{$metadata->translator} using the default locale '$localeUsed'.";
throw new MissingTranslationException($msg);
}
} else {
$localesToTry = $this->dm->getLocaleChooserStrategy()->getPreferredLocalesOrder($document, $metadata, $locale);
at UnitOfWork ->doLoadTranslation (object(BannerImage), object(ClassMetadata), null, false)
in ../website/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php at line 416
at UnitOfWork ->getOrCreateDocument ('Acme\Cmf\BannerBundle\Document\BannerImage', object(Node), array('refresh' => true))
in ../website/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php at line 498
at UnitOfWork ->refreshDocumentForProxy ('Acme\Cmf\BannerBundle\Document\BannerImage', object(BannerImage))
in ../website/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentRepository.php at line 190
at DocumentRepository ->refreshDocumentForProxy (object(BannerImage))
in kernel.root_dir/cache/dev/doctrine/PHPCRProxies/__CG__AcmeCmfBannerBundleDocumentBannerImage.php at line 38
at BannerImage ->__load ()
in kernel.root_dir/cache/dev/doctrine/PHPCRProxies/__CG__AcmeCmfBannerBundleDocumentBannerImage.php at line 203
at BannerImage ->__get ('title')
in kernel.root_dir/cache/dev/classes.php at line 9641
at Twig_Template ->getAttribute (object(BannerImage), 'title')
in kernel.root_dir/cache/dev/twig/35/6c/4e746e581fa6bc7c5d5387d7b836.php at line 29
at __TwigTemplate_356c4e746e581fa6bc7c5d5387d7b836 ->doDisplay (array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4'), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl'), array())
in kernel.root_dir/cache/dev/classes.php at line 9527
at Twig_Template ->displayWithErrorHandling (array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4'), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl'), array())
in kernel.root_dir/cache/dev/classes.php at line 9505
at Twig_Template ->display (array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4')))
in kernel.root_dir/cache/dev/classes.php at line 9515
at Twig_Template ->render (array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4')))
in ../website/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php at line 53
at TwigEngine ->render ('AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4')))
in ../website/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php at line 78
at TwigEngine ->render ('AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4')))
in ../website/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Debug/TimedTwigEngine.php at line 52
at TimedTwigEngine ->render ('AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4')))
in ../website/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php at line 107
at TwigEngine ->renderResponse ('AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4')), object(Response))
in ../website/vendor/sonata-project/block-bundle/Sonata/BlockBundle/Block/BaseBlockService.php at line 46
at BaseBlockService ->renderResponse ('AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', array('block' => object(ImageBlock), 'items' => array('image1' => object(BannerImage)), 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig', 'maxItems' => '4')), object(Response))
in ../website/src/Acme/Cmf/BannerBundle/Block/MediaBlockService.php at line 63
at MediaBlockService ->execute (object(ImageBlock), object(Response))
in ../website/vendor/sonata-project/block-bundle/Sonata/BlockBundle/Block/BlockRenderer.php at line 80
at BlockRenderer ->render (object(ImageBlock), null)
in ../website/vendor/sonata-project/block-bundle/Sonata/BlockBundle/Block/TraceableBlockRenderer.php at line 53
at TraceableBlockRenderer ->render (object(ImageBlock))
in ../website/vendor/sonata-project/block-bundle/Sonata/BlockBundle/Twig/Extension/BlockExtension.php at line 182
at BlockExtension ->renderBlock (array('name' => 'main_top', 'settings' => array('template' => 'AcmeApplicationBundle:Block:BannerImage/page_main_top.html.twig')))
in kernel.root_dir/cache/dev/twig/f4/68/496ca79e230517e95ad819e0da20.php at line 139
at __TwigTemplate_f468496ca79e230517e95ad819e0da20 ->block_banner (array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl', 'content_classes' => array('default-page'), '_body_classes' => false), array('content' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_content'), 'left_sidebar' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_left_sidebar'), 'blocks' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_blocks')))
at call_user_func (array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_banner'), array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl', 'content_classes' => array('default-page'), '_body_classes' => false), array('content' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_content'), 'left_sidebar' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_left_sidebar'), 'blocks' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_blocks')))
in kernel.root_dir/cache/dev/classes.php at line 9408
at Twig_Template ->displayBlock ('banner', array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl', 'content_classes' => array('default-page'), '_body_classes' => false), array('content' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_content'), 'left_sidebar' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_left_sidebar'), 'blocks' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_blocks'), 'banner' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_banner')))
in kernel.root_dir/cache/dev/classes.php at line 9448
at Twig_Template ->renderBlock ('banner', array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl', 'content_classes' => array('default-page'), '_body_classes' => false), array('content' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_content'), 'left_sidebar' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_left_sidebar'), 'blocks' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_blocks'), 'banner' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_banner')))
in kernel.root_dir/cache/dev/twig/d7/25/98f7d78f2bb2730f2ae8228e33c1.php at line 165
at __TwigTemplate_d72598f7d78f2bb2730f2ae8228e33c1 ->doDisplay (array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl', 'content_classes' => array('default-page')), array('content' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_content'), 'left_sidebar' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_left_sidebar'), 'blocks' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_blocks'), 'banner' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_banner')))
in kernel.root_dir/cache/dev/classes.php at line 9527
at Twig_Template ->displayWithErrorHandling (array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl', 'content_classes' => array('default-page')), array('content' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_content'), 'left_sidebar' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_left_sidebar'), 'blocks' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_blocks'), 'banner' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_banner')))
in kernel.root_dir/cache/dev/classes.php at line 9505
at Twig_Template ->display (array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl', 'content_classes' => array('default-page')), array('content' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_content'), 'left_sidebar' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_left_sidebar'), 'blocks' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_blocks'), 'banner' => array(object(__TwigTemplate_f468496ca79e230517e95ad819e0da20), 'block_banner')))
in kernel.root_dir/cache/dev/twig/f4/68/496ca79e230517e95ad819e0da20.php at line 33
at __TwigTemplate_f468496ca79e230517e95ad819e0da20 ->doDisplay (array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl'), array())
in kernel.root_dir/cache/dev/classes.php at line 9527
at Twig_Template ->displayWithErrorHandling (array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden')), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(GlobalVariables), 'sonata_block' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), 'mainMenu' => 'main/nl', 'subMenu' => 'main/nl/partners', 'footerMenu' => 'footer/nl'), array())
in kernel.root_dir/cache/dev/classes.php at line 9505
at Twig_Template ->display (array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden'))))
in kernel.root_dir/cache/dev/classes.php at line 9515
at Twig_Template ->render (array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden'))))
in ../website/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php at line 53
at TwigEngine ->render ('AcmeApplicationBundle:Page:default.html.twig', array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden'))))
in ../website/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php at line 78
at TwigEngine ->render ('AcmeApplicationBundle:Page:default.html.twig', array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden'))))
in ../website/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Debug/TimedTwigEngine.php at line 52
at TimedTwigEngine ->render ('AcmeApplicationBundle:Page:default.html.twig', array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden'))))
in ../website/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php at line 107
at TwigEngine ->renderResponse ('AcmeApplicationBundle:Page:default.html.twig', array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden'))))
in ../website/vendor/symfony-cmf/content-bundle/Symfony/Cmf/Bundle/ContentBundle/Controller/ContentController.php at line 99
at ContentController ->renderResponse ('AcmeApplicationBundle:Page:default.html.twig', array('cmfMainContent' => object(AcmePage), 'breadcrumbs' => array(array('title' => 'Partners', 'url' => '/app_dev.php/nl/partners'), array('title' => 'Partner worden', 'url' => '/app_dev.php/nl/partners/partner-worden'))))
in ../website/vendor/symfony-cmf/content-bundle/Symfony/Cmf/Bundle/ContentBundle/Controller/ContentController.php at line 87
at ContentController ->indexAction (object(Request), object(AcmePage), 'AcmeApplicationBundle:Page:default.html.twig')
in ../website/src/Acme/RU/ApplicationBundle/Controller/DefaultController.php at line 35
at DefaultController ->indexAction (object(Request), object(AcmePage), 'AcmeApplicationBundle:Page:default.html.twig')
at call_user_func_array (array(object(DefaultController), 'indexAction'), array(object(Request), object(AcmePage), 'AcmeApplicationBundle:Page:default.html.twig'))
in kernel.root_dir/bootstrap.php.cache at line 1428
at HttpKernel ->handleRaw (object(Request), '1')
in kernel.root_dir/bootstrap.php.cache at line 1392
at HttpKernel ->handle (object(Request), '1', true)
in kernel.root_dir/bootstrap.php.cache at line 1568
at HttpKernel ->handle (object(Request), '1', true)
in kernel.root_dir/bootstrap.php.cache at line 619
at Kernel ->handle (object(Request))
in ../website/web/app_dev.php at line 25

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.