11ty/eleventy

`eleventyConfig.setFreezeReservedData(false)` unexpected behaviour

Opened this issue · 0 comments

Operating system

macOS Sequoia 15.0.1

Eleventy

3.0.0

Describe the bug

Hello!

When upgrading to 11ty 3, the site wouldn't build, and the terminal output instructed me to use eleventyConfig.setFreezeReservedData(false) because I was using the variable content on a page.

I set eleventyConfig.setFreezeReservedData(false) and my site built successfully. I thought that meant I could carry on using the content variable.

However, the page using the content variable wouldn't render, and output [object Object].

Either I misunderstood what eleventyConfig.setFreezeReservedData(false) did (as I presumed I wouldn't need to refactor out the content variable, or it didn't work as expected.

Here's the commit where I upgraded to 11ty 3: whitep4nth3r/mk2-p4nth3rblog@d867f25#diff-c306e0a99961a16f5c5c83996caa0958b94006d97f97475049ea3a08036bb5b0R29

Reproduction steps

  1. Use a content variable in a .js template
  2. Use the eleventyConfig.setFreezeReservedData(false) in the .eleventy file
  3. Observe that the page using the content var does not render HTML, except a string of [object Object]

Expected behavior

I expected to continue to be able to use the content variable when using eleventyConfig.setFreezeReservedData(false).

Reproduction URL

https://672b9214f117340008916caf--mk2-p4nth3rblog.netlify.app/sponsorships/

Screenshots

image