BoltTranslate / Translate

Provides translation for contenttypes.
Other
43 stars 38 forks source link

[BUG] Key "title" for array with keys "label, delabel, link, path" does not exist in "@bolt/frontend/_sub_menu_translated.twig #126

Closed melcarthus closed 7 years ago

melcarthus commented 7 years ago

With strict variables set to true this error gets thrown.

Twig_Error_Runtime in Template.php line 556: 
Key "title" for array with keys "label, delabel, link, path" does not exist in "@bolt/frontend/_sub_menu_translated.twig" at line 24.

I looked like this happend all of a sudden. I was filling pages and other content types when this error happend 'suddenly' When I clear the menu.yml everything is fine. S

Details

Reproduction

Can't reproduce.

SvanteRichter commented 7 years ago

I think the issue is that |default(item.title)|default('') should have been |default(item.title|default('')) here: https://github.com/AnimalDesign/bolt-translate/blob/master/templates/frontend/_sub_menu_translated.twig#L24

melcarthus commented 7 years ago

You where right.