跳至內容
選單
此問題已被標幟
1 回覆
7189 瀏覽次數

My logs files are pregnant with a template error on every page load.

The root cause line of the traceback says :

"QWebException: foreach enumerator 'languages' is not defined while rendering template 'website.layout'"

I posted the complete traceback of the error here : https://gist.github.com/martinhbramwell/908b7f0787b8e8b93955

The short version of my question is :  is this a known error? where's the fix?

The long version  :  website.layout seems to be subclassed all over the place. where is the root template? how do I track down which subclass template has the root cause?

I deliberately changed the language of the website (and my browser), but the language did not change. and the error persists.

 

頭像
捨棄
最佳答案

Please go to the following file addons/website/views/website_templates.xml on line no. 181

change:  <li t-foreach="website.get_languages()" t-as="lg">

instead of: <li t-foreach="languages" t-as="lg">

頭像
捨棄
作者

That worked, but so did getting the very latest nightly. Thanks in any case.