Closed kslstn closed 1 year ago
@kslstn I was not able to reproduce this issue but I did notice a couple of other issues.
You can see this video for more info: https://www.loom.com/share/d28ec20d43f94f22a243953aa028ccc8
Hi Logan, thank you for the detailed follow-up. In my tina-issues repo, the templates now work too. I wish it were the case for our real site too. I tried a fresh install and bit by bit I introduced my settings, but it still fails with the templates. I will try again tomorrow.
I'm also noticing an issue with a collection that uses templates. I'm getting a pop up with :
[Error] GetCollection failed: Unable to fetch, errors: Error querying file content/consciousCollective/3f3eb861a3d5202fe75bec4c349e96fa06d43dcf.mdx from collection consciousCollective. Please run "tinacms audit" or add the --verbose option for more info
and in the terminal i'm getting
Error querying file content/consciousCollective/3f3eb861a3d5202fe75bec4c349e96fa06d43dcf.mdx from collection consciousCollective. Please run "tinacms audit" or add the --verbose option for more info
GraphQL request:8:11
8 | documents(sort: $sort, after: $after, first: $limit, filter: $filter,
| ^
| folder: $folder) @include(if: $includeDocuments) {
seems like an auto generated file? (the audit it running clean)
Update:
removal of templates has seemed to solve the issue
Seems it crashes due to the fields not being found: const sortField = fields.find
My Pages has multiple Templates, maybe that helps @logan-anderson
Tried to remove the templates and only use fields for testing, sadly it does not work. Pages is rendered but admin crashes
Okay now it works (without templates) on my other collections too. Sadly I need the templates, it did work before and I also do not have any missing template definitions in frontmatter. Also does tinacms audit
shows me that everything is okay.
But what I have since some time how is following error message which I did ignore as it did not break anything (until now)
❯ yarn tinacms audit
yarn run v1.22.19
$ /Users/Greg/Projekte/Mischa/grenzen-sind-relativ-tina/node_modules/.bin/tinacms audit
Starting Tina Audit
▲ [WARNING] Comparison with -0 using the "===" operator will also match 0 [equals-negative-zero]
../../../../../private/var/folders/mq/7pcgsjf108qgppygvpwr_z040000gn/T/1682674916854/config.build.jsx:184224:28:
184224 │ } else if (x3 === -0) {
╵ ~~
Floating-point equality is defined such that 0 and -0 are equal, so "x === -0" returns true for
both 0 and -0. You need to use "Object.is(x, -0)" instead to test for -0.
Indexing local files ⠙
Checking page collection. 135 Documents
Checking navMain collection. 1 Documents
Checking navFooter collection. 1 Documents
✅ Audit passed
✨ Done in 5.94s.
Inside the Admin, I get the following message about a file that does not exist:
@HenrySkup, @appinteractive or @kslstn Are any of your repos that you are seeing this in public by any chance? (Or if your comfortable, temporarily give me access ?)
Or is there anyway you could produced a reproduction repo?
I am not able to reproduce this at this time.
@logan-anderson I have a similar problem and can reproduce it. My current collection settings include:
path: "_src",
match: {
include: "*/pages/*",
},
These settings no longer work. This is needed to pickup folders _src/en/pages/*.md
and _src/fr/pages/*.md
. However, if I change the settings to (only half my documents are listed):
path: "_src/en/pages",
Then it works as expected.
Hi @logan-anderson, pbougie's solution didn't work for me. I've just invited you to our website's repo (kslstn/fortomorrow-website).
@logan-anderson I've reproduced it here. Check the Blog Posts section.
https://github.com/pbougie/tinacms-20230419/commit/a45c3b7a74ec1dd7d6e1f6ffd02c97bdad2f85c7
@kslstn and @appinteractive I have a PR pushed up for the can read property find of undefined issue
@pbougie Can you describe the issue you are seeing and how to reproduce it? I don't see any issues in the admin interface on your reproduction site
UPDATE: My bad I forgot to run yarn install
. I see the issue and hopefully can fix it.
@kslstn @appinteractive @pbougie @HenrySkup Both of these issues should be fixed now. Please let us know if it is still happening on the latest version
@logan-anderson I'm still getting an error but a different one. The first page now loads but when I select a subfolder, I get this error can't access property "breadcrumbs", document2._sys is undefined
.
I'm having difficulty reproducing it in a test project however. I have encountered another bug in my test project. Once going through a couple of folders, the documents don't load:
To reproduce:
https://github.com/pbougie/tinacms-20230419
yarn install
and yarn dev
Is there a way to disable the folders?
@pbougie taking a look at this now
I don't think the issue in your test project is related to the breadcrumbs error.
I was able to fix that one by doing the following:
return { params: { slug: x.node._sys.relativePath.split('/') } };
relativePath: ctx.params.slug.join('/'),
tina/config.js
to: ui: { router: ({ document }) => { return
/posts/${document._sys.relativePath}; }, },
Any other details on the project with the breadcrumbs error would be helpful in determining the issue (you can also invite me to the github repository if it is private kldavis4
)
@pbougie do you have anywhere in your tina/config.js where there is a _sys.breadcrumbs
(most likely in a ui.router)?
@kldavis4 I'm not referencing _sys.breadcrumbs
or using ui.router
anywhere. My project is built with Eleventy.
@pbougie ok, I'm happy to take a look if you want to invite me to your project. Otherwise I'll need a reproduction
@kldavis4 Ok I've managed to reproduce it:
npm install
npm run dev
http://localhost:8080/admin/
en
or fr
@pbougie great - taking a look now
@pbougie did you intend to disable create/delete for the pages collection?
@kldavis4 Yes, they're a fixed number in my actual project.
@pbougie ok - sounds good. I've found and fixed the issue. Thanks for the reproduction. I'll let you know once it is released
@kldavis4 Great news, thanks.
@logan-anderson with the latest release I can view the collections again, thank you!
Works thanks 👍
@pbougie the fixes for your issue have been released
@kldavis4 Thanks.
Describe the issue that you're seeing. Any Loom videos or screenshots usually help a lot!
For one collection, I've defined templates as described in the docs.
Tina CMS builds the dev server without error, but when I use the admin to navigate to the collection, it won't load, saying "Looks like there's nothing to edit on this page." I can't create new pages there either.
When I look at the browser I see the following errors: Uncaught TypeError: fields is undefined [...] The above error occurred in the component: [...]
Reproduction
https://github.com/kslstn/tina-issues/tree/templates
Steps to reproduce
Update:
dependencies:
devDependencies:
Then define a template as described in the docs.
System Info
Validations