事件页面错误:未知块标记项
Error on Events Page: unknown block tag item
我对撇号还很陌生,最近遇到了以下错误。
我克隆了 Apostrophe Open Museum 存储库并在本地弄乱了几天以进行站点设置...一切都进行得很顺利,直到撇号部分页面都决定死掉在我身上。
这两个页面以及我创建的另一个“推荐”页面都发生了这种情况。我没有更改事件页面、事件小部件或包含配置的事件目录。
有人知道我需要从哪里开始调试吗?我花了几天时间试图解决我搞砸的问题,但我这辈子都解决不了。
我有一种感觉,我正在做一些超级愚蠢的事情!
e.stack: Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html) [Line 18, Column 12]
unknown block tag: item
at Object.exports.prettifyError (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/lib.js:34:15)
at /Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:486:31
at new_cls.root [as rootRenderFunc] (eval at _compile (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:565:24), <anonymous>:62:3)
at new_cls.render (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:479:15)
at Object.self.renderBody (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:318:47)
at Object.self.renderForModule (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:179:19)
at Object.self.render (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:377:34)
at /Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:445:21
at Object.self.renderPageForModule (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:697:21)
at /Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:575:31
at /Users/username/website/node_modules/async/lib/async.js:726:13
at /Users/username/website/node_modules/async/lib/async.js:52:16
at /Users/username/website/node_modules/async/lib/async.js:269:32
at /Users/username/website/node_modules/async/lib/async.js:44:16
at /Users/username/website/node_modules/async/lib/async.js:723:17
at /Users/username/website/node_modules/async/lib/async.js:167:37
at /Users/username/website/node_modules/async/lib/async.js:52:16
at iterate (/Users/username/website/node_modules/async/lib/async.js:260:24)
at Object.async.forEachOfSeries.async.eachOfSeries (/Users/username/website/node_modules/async/lib/async.js:281:9)
at Object.async.forEachSeries.async.eachSeries (/Users/username/website/node_modules/async/lib/async.js:214:22)
at Object.self.loadDeferredWidgets (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-areas/lib/api.js:538:18)
at loadDeferredWidgets (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:590:32)
:: 2020-10-15T18:27:23+0100: template error at /events
Current user: admin
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html) [Line 18, Column 12]
unknown block tag: item
at Object.exports.prettifyError (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/lib.js:34:15)
at /Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:486:31
at new_cls.root [as rootRenderFunc] (eval at _compile (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:565:24), <anonymous>:62:3)
at new_cls.render (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:479:15)
at Object.self.renderBody (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:318:47)
at Object.self.renderForModule (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:179:19)
at Object.self.render (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:377:34)
at /Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:445:21
at Object.self.renderPageForModule (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:697:21)
at /Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:575:31
at /Users/username/website/node_modules/async/lib/async.js:726:13
at /Users/username/website/node_modules/async/lib/async.js:52:16
at /Users/username/website/node_modules/async/lib/async.js:269:32
at /Users/username/website/node_modules/async/lib/async.js:44:16
at /Users/username/website/node_modules/async/lib/async.js:723:17
at /Users/username/website/node_modules/async/lib/async.js:167:37
at /Users/username/website/node_modules/async/lib/async.js:52:16
at iterate (/Users/username/website/node_modules/async/lib/async.js:260:24)
at Object.async.forEachOfSeries.async.eachOfSeries (/Users/username/website/node_modules/async/lib/async.js:281:9)
at Object.async.forEachSeries.async.eachSeries (/Users/username/website/node_modules/async/lib/async.js:214:22)
at Object.self.loadDeferredWidgets (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-areas/lib/api.js:538:18)
at loadDeferredWidgets (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:590:32) {
name: 'Template render error'
}
呃,我知道我很愚蠢,撇号没什么!
这是我的双节棍 if 语句!我忘了把 elif
放在表达式的开头,所以它导致了错误。
虽然从错误中找出来并不是最容易的!
我拥有的:
{% item === 'date' %}
我需要的:
{% elif item === 'date' %}
我对撇号还很陌生,最近遇到了以下错误。
我克隆了 Apostrophe Open Museum 存储库并在本地弄乱了几天以进行站点设置...一切都进行得很顺利,直到撇号部分页面都决定死掉在我身上。
这两个页面以及我创建的另一个“推荐”页面都发生了这种情况。我没有更改事件页面、事件小部件或包含配置的事件目录。
有人知道我需要从哪里开始调试吗?我花了几天时间试图解决我搞砸的问题,但我这辈子都解决不了。
我有一种感觉,我正在做一些超级愚蠢的事情!
e.stack: Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html) [Line 18, Column 12]
unknown block tag: item
at Object.exports.prettifyError (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/lib.js:34:15)
at /Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:486:31
at new_cls.root [as rootRenderFunc] (eval at _compile (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:565:24), <anonymous>:62:3)
at new_cls.render (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:479:15)
at Object.self.renderBody (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:318:47)
at Object.self.renderForModule (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:179:19)
at Object.self.render (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:377:34)
at /Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:445:21
at Object.self.renderPageForModule (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:697:21)
at /Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:575:31
at /Users/username/website/node_modules/async/lib/async.js:726:13
at /Users/username/website/node_modules/async/lib/async.js:52:16
at /Users/username/website/node_modules/async/lib/async.js:269:32
at /Users/username/website/node_modules/async/lib/async.js:44:16
at /Users/username/website/node_modules/async/lib/async.js:723:17
at /Users/username/website/node_modules/async/lib/async.js:167:37
at /Users/username/website/node_modules/async/lib/async.js:52:16
at iterate (/Users/username/website/node_modules/async/lib/async.js:260:24)
at Object.async.forEachOfSeries.async.eachOfSeries (/Users/username/website/node_modules/async/lib/async.js:281:9)
at Object.async.forEachSeries.async.eachSeries (/Users/username/website/node_modules/async/lib/async.js:214:22)
at Object.self.loadDeferredWidgets (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-areas/lib/api.js:538:18)
at loadDeferredWidgets (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:590:32)
:: 2020-10-15T18:27:23+0100: template error at /events
Current user: admin
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html)
Template render error: (events-pages:index.html) [Line 18, Column 12]
unknown block tag: item
at Object.exports.prettifyError (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/lib.js:34:15)
at /Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:486:31
at new_cls.root [as rootRenderFunc] (eval at _compile (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:565:24), <anonymous>:62:3)
at new_cls.render (/Users/username/website/node_modules/@apostrophecms/nunjucks/src/environment.js:479:15)
at Object.self.renderBody (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:318:47)
at Object.self.renderForModule (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:179:19)
at Object.self.render (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:377:34)
at /Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:445:21
at Object.self.renderPageForModule (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-templates/index.js:697:21)
at /Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:575:31
at /Users/username/website/node_modules/async/lib/async.js:726:13
at /Users/username/website/node_modules/async/lib/async.js:52:16
at /Users/username/website/node_modules/async/lib/async.js:269:32
at /Users/username/website/node_modules/async/lib/async.js:44:16
at /Users/username/website/node_modules/async/lib/async.js:723:17
at /Users/username/website/node_modules/async/lib/async.js:167:37
at /Users/username/website/node_modules/async/lib/async.js:52:16
at iterate (/Users/username/website/node_modules/async/lib/async.js:260:24)
at Object.async.forEachOfSeries.async.eachOfSeries (/Users/username/website/node_modules/async/lib/async.js:281:9)
at Object.async.forEachSeries.async.eachSeries (/Users/username/website/node_modules/async/lib/async.js:214:22)
at Object.self.loadDeferredWidgets (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-areas/lib/api.js:538:18)
at loadDeferredWidgets (/Users/username/website/node_modules/apostrophe/lib/modules/apostrophe-module/index.js:590:32) {
name: 'Template render error'
}
呃,我知道我很愚蠢,撇号没什么!
这是我的双节棍 if 语句!我忘了把 elif
放在表达式的开头,所以它导致了错误。
虽然从错误中找出来并不是最容易的!
我拥有的:
{% item === 'date' %}
我需要的:
{% elif item === 'date' %}