Home
Support Forums

Could not resolve pagination key in template data:

I have a site that is called bookmarksdb that is a copy of the code found here:

When I try to deploy, I am getting an error that is related to pagination in a template. The relevant part of the log is as follows:

9:54:06 PM: Problem writing Eleventy templates: (more in DEBUG output)
9:54:06 PM: > Could not resolve pagination key in template data: bookmarks
9:54:06 PM: Error was thrown:
9:54:06 PM: Error: Could not resolve pagination key in template data: bookmarks
9:54:06 PM: at Pagination._resolveItems (/opt/build/repo/node_modules/@11ty/eleventy/src/Plugins/Pagination.js:102:13)
9:54:06 PM: at Pagination.setData (/opt/build/repo/node_modules/@11ty/eleventy/src/Plugins/Pagination.js:65:24)
9:54:06 PM: at new Pagination (/opt/build/repo/node_modules/@11ty/eleventy/src/Plugins/Pagination.js:13:10)
9:54:06 PM: at Template.getTemplates (/opt/build/repo/node_modules/@11ty/eleventy/src/Template.js:425:21)
9:54:06 PM: at TemplateMap.initDependencyMap (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateMap.js:246:41)
9:54:06 PM: at async TemplateMap.cache (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateMap.js:279:5)
9:54:06 PM: at async TemplateWriter._createTemplateMap (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js:124:3)
9:54:06 PM: at async TemplateWriter.write (/opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js:155:3)
9:54:06 PM: at async Eleventy.write (/opt/build/repo/node_modules/@11ty/eleventy/src/Eleventy.js:428:13)
9:54:06 PM: Processed 0 files in 0.10 seconds (v0.9.0)

If it helps, the code in bookmarks.liquid is as follows:

[
    {% for link in bookmarks %}
        {{ link }}{% if forloop.last %}{% else %},{% endif %}
    {% endfor %}
]

I understand this is an eleventy issue but I am hoping someone has an idea of how to debug/fix this problem.

Thanks in advance.
Jayaram

Hi, @bjayaram. I just wanted to set expectations about the types of questions our support team answers. This is explains in our Support Scope page here:

To summarize, our team doesn’t answer questions about third-party code as a rule. This question is still welcome on this community site and someone else here may still answer though.