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

Error: Cannot destructure property 'data' of 'field.cmsContent' as it is undefined. #27

Closed
dsasko opened this issue Oct 17, 2024 · 1 comment

Comments

@dsasko
Copy link

dsasko commented Oct 17, 2024

On a freshly installed Lume with Simple Blog theme I get an error when trying to create a Post.

OS: MacOS v15.0.1
Deno: v2.0.0
Lume: v2.3.3

Error message

Cannot destructure property 'data' of 'field.cmsContent' as it is undefined.

Steps to reproduce

  1. > deno run -A https://lume.land/init.ts
  2. > (install a theme)
  3. > (_config.ts)
  4. > (Simple Blog)
  5. > deno task cms
  6. Open the CMS in a browser (http://localhost:3000/admin)
  7. Navigate to Posts > Create post
  8. Observe error in terminal

Error trace

ERROR TypeError: 2024-10-17T08:08:49.804Z [GET] http://localhost:3000/admin/collection/posts/create - Cannot destructure property 'data' of 'field.cmsContent' as it is undefined.
    at Object.init (https://deno.land/x/lume_theme_simple_blog@v0.15.5/_cms.ts:103:17)
    at prepareField (https://cdn.jsdelivr.net/gh/lumeland/cms@v0.7.0/core/utils/data.ts:69:17)
    at https://cdn.jsdelivr.net/gh/lumeland/cms@v0.7.0/core/templates/collection/create.ts:21:38
    at Array.map (<anonymous>)
    at template (https://cdn.jsdelivr.net/gh/lumeland/cms@v0.7.0/core/templates/collection/create.ts:21:23)
    at Object.handler (https://cdn.jsdelivr.net/gh/lumeland/cms@v0.7.0/core/routes/collection.ts:140:9)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async dispatch (https://jsr.io/@hono/hono/4.6.3/src/compose.ts:74:17)
    at async handler (https://jsr.io/@hono/hono/4.6.3/src/hono-base.ts:223:12)
    at async dispatch (https://jsr.io/@hono/hono/4.6.3/src/compose.ts:74:17)
@oscarotero
Copy link
Member

Oops. This is due a change I had to do in the latest version of the CMS.
I just released a new version that fixes this issue. Just upgrade the theme to 0.15.6.
Sorry for the trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants