Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested rich-text templates leads to item is undefined #4522

Open
3 tasks done
sebastianhutter opened this issue May 12, 2024 · 0 comments
Open
3 tasks done

Nested rich-text templates leads to item is undefined #4522

sebastianhutter opened this issue May 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sebastianhutter
Copy link

Describe the issue that you're seeing. Any Loom videos or screenshots usually help a lot!

I have defined nested rich-text templates to create rows with a user-defined amount of columns.

(example md file with hugo short codes)

{{< row >}}
{{< col >}}
hello
{{< /col >}}

{{< col >}}
world
{{< /col >}}

{{< col >}}
!!!
{{< /col >}}
{{< /row >}}

Trying to open the nested col template in the tina-cms editor leads to the error message item is undefined
CleanShot 2024-05-12 at 15 44 09@2x

Reproduction

https://github.com/sebastianhutter/tina-cms-item-is-undefined

Steps to reproduce

Clone reproduction repository

Install hugo

Install node modules

npm i

Run the demo environment

npx tinacms dev -c "hugo server -D -p 1313 --bind 0.0.0.0"

Open http://localhost:1313/admin

Navigate to Posts -> Hello World

Open the embed Create row with columns

Open any of the Add column to row embeds

The error message item is undefined is shown

The rendered version of the hello world page can be accessed via http://localhost:1313/posts/hello-world

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 1.39 GB / 32.00 GB
    Shell: 5.1.16 - /opt/homebrew/bin/bash
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.22 - ~/Repository/private/tina-item-is-undefined/node_modules/.bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 124.0.6367.158
    Safari: 17.4.1
  npmPackages:
    @tinacms/cli: ^1.5.45 => 1.5.45 
    tinacms: ^1.6.3 => 1.6.3 

hugo v0.122.0

Validations

@sebastianhutter sebastianhutter added the bug Something isn't working label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant