-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Admin panel crashes with fresh database and project scaffolded as blog #343
Comments
Good find! Fixed. Thanks Richard. Releasing new version now. |
This looks to still be an issue. As of today, I did npx create-payload-app, used the blog starter template. When creating/editing a post, the rich text editor has the upload button, and when clicked it just goes to a blank screen. Adding the above Image collection code resolved issue. Perhaps the default Blog template should be updated to include the Image collection? |
@aaronmarkle I was able to recreate this on my end. We'll get this squared away. Thank you for the report! |
This issue has been automatically locked. |
Bug Report
The following error causes the admin panel to crash when creating the first post in the blog example.
Uncaught TypeError: firstAvailableCollection is undefined
index.js:46
React 3
UploadButton index.js:44
React 12
unstable_runWithPriority scheduler.development.js:468
React 2
workLoop scheduler.development.js:417
flushWork scheduler.development.js:390
performWorkUntilDeadline scheduler.development.js:157
Expected Behavior
Should be able to create my first blog post.
Possible Solution
Seems to be an issue with the new RichText upload button. Error occurs on this line: https://github.com/payloadcms/payload/blob/master/src/admin/components/forms/field-types/RichText/elements/upload/Button/index.tsx#L55
My suggestion is to disable or hide the button if no collections are found with
{ enableRichTextRelationship: true }
and update the Blog template to include a collection with{ enableRichTextRelationship: true }
by default.For the time being I added the following collection to my project:
Steps to Reproduce
npx create-payload-app
Detailed Description
Payload version: 0.10.11
The text was updated successfully, but these errors were encountered: