CloudCannon / bookshop

📚 A component development workflow for static websites.
MIT License
249 stars 21 forks source link

Bug when using liquid variables assigned to input data #73

Closed meddlenz closed 2 years ago

meddlenz commented 3 years ago

Tested using the Jekyll Bookshop Starter repo.

If you assign front matter data to a Liquid variable, then use that variable for rendered content Bookshop encounters a bug and gets stuck in an infinite loop. JS Error: Error evaluating undefined TypeError: str is undefined

This happens when adding components to pages on a CloudCannon hosted website.

To replicate:

  1. Within the Content component in this site, assign the markup include.content_html to a Liquid variable, then replace the markup referencing this data with the new variable.
  2. Push changes to the repo, go to CloudCannon and open a page within the visual editor.
  3. Open the browser web console and add the modified component to a page, then see the errors within the web console.

Example repo