Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
7194 มุมมอง

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.