Save button not working after upgrade to v1
alanchan-dev opened this issue · comments
Provide environment information
"dependencies": {
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-navigation-menu": "^1.1.4",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"autoprefixer": "10.4.16",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cmdk": "^0.2.0",
"eslint": "8.53.0",
"eslint-config-next": "^14.0.2",
"framer-motion": "^10.16.4",
"gray-matter": "^4.0.3",
"lucide-react": "^0.292.0",
"next": "^14.0.2",
"next-themes": "^0.2.1",
"outstatic": "^1.0.2",
"postcss": "^8.4.31",
"react": "^18.2.0",
"react-code-blocks": "^0.1.4",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.0",
"remark": "^15.0.1",
"remark-gfm": "^4.0.0",
"styled-components": "6.1.1",
"tailwind-merge": "^2.0.0",
"tailwindcss": "3.3.5",
"tailwindcss-animate": "^1.0.7",
"typescript": "5.2.2"
}
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
After migrating to v1.0.2 using npm install outstatic@latest
and also use the app router setup, when creating post and clicking Save button doesn't have any reaction. Deleting post is still working.
Expected Behavior
Save should work as intended.
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
N/A
To Reproduce
Migrate to Outstatic 1.0.2, create a new post and click Save.
Hey @alanchan-dev - thanks for reporting this issue. I'd love to help you sort it out.
Can you provide a simple repo where the error can be replicated?
Do you get any error logs?
Hi @avitorio.
Here is a link to minimal repo: https://github.com/alanchan-dev/issue-test
It was created using Deploy with Vercel from https://outstatic.com/docs/getting-started
I've setup with OAuth as shown in the documentation: Initiating Setup: GitHub Authentication.
Nope, there isn't any error showing.
Not sure is this useful, it's from chrome developer console -> Network tab, when i click on the save button it does send this request.
Request URL:
https://issue-test-ecru.vercel.app/api/outstatic/user
Request Method:
GET
Status Code:
200 OK
Remote Address:
76.76.21.9:443
Referrer Policy:
strict-origin-when-cross-origin
Are you doing GitHub Oauth or GitHub Apps authentication?
I've tried both, same result.
Hi @avitorio, I found the issue, it was because when creating a post, the author name field was empty. Didn't know it was mandatory, when I click save it does not prompt me to fill that field too. Sorry for the confusion.
Oh wow, thanks for looking into it. Are you getting the other errors on default required fields such as title and content?
A few different scenarios I tried:
- Create new post -> fill in Title ( leave Author name and content block empty) -> Click Save -> It will show Content is required but does not prompt that Author is needed
- Create new post -> fill in Title and Contents ( leave Author name empty) -> Click Save -> No prompt is shown indicating Author name is required
- Create new post -> fill in Title and Contents -> Type something into Author name field but remove them using backspace -> Click Save -> It will save the post
Summary:
I think Title and Content are working as intended (They must be filled to proceed save), however Author name field is not having prompt that it is required. One thing to note is it can be bypassed by filling in and clearing it then can proceed to save. Custom fields that are marked as required are working as intended as of now.
Interesting! Would it be possible for you to create an issue for this? I'll try to work on it, or if you have the time and want to contribute any help is welcome!
Created an issue for the actual problem. Closing this one. @avitorio Sorry I'm not that familiar with how to fix it yet as I'm quite new to the framework. I will try to look into how it works when I have time. Thank you for the hard work, I love Outstatic as it is the only solution to my needs.