-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to save specific block in array of blocks #44
Comments
I'm not sure why you would not have an updated API running. From create-payload-app, the package.json has a script for Do you see in your console, after saving a file that it says Are you having to stop and start node each time you make changes? How are you running your project? |
That's probably it. I'm not seeing any messages from nodemon on file change only messages from webpack. I don't think I've changed anything from the defaults. This might be related to a couple of other frustrations I'm having.
|
Yeah, that definitly is the issue. Each save you should see:
You're only getting webpack updates and not nodemon and Payload. I landed on this thread with a few suggestions about nodemon. Might be worth checking out?
Do you have another project that you can test nodemon on your system, seperate from Payload to isolate the issue? |
@richardvanbergen what is the filename of your config and / or block config filename? Are you using a We can update this within create-payload-app, and you can also update your local config to support it as well by changing your Let us know! |
Hey guys really sorry but I've looked into it and it's down to the fact that some of the files in a yarn workspace and Changing the dev command to |
No problem, @richardvanbergen! Thanks so much for sharing the solution! |
Update
It's actually the API not being aware of newly created blocks until the server restarts.
Just restarted the development server. Seems that blocks in the API don't get restarted the same way the API UI does. After closing down the server and starting up again entirely it now works as expected.
Don't know if you still want to consider this a bug but it was confusing from a developer experience perspective because everything else restarts smoothly. 😎
Bug Report
Certain blocks are failing to update their content via the admin. Initially, I thought it was down to a definition I created but after copying the QuoteBlock example from here I find they are also not updating.
I will try to experiment later and find some more information but I'm hoping you might have some insight in the mean time.
Expected Behavior
My blocks should save the content I added to them.
Current Behavior
Data returned from the API does not include new values added via the block. Also attached is the request/response that's made to the API.
Steps to Reproduce
Detailed Description
Request Screenshots:
Request stack trace:
put @ http://localhost:3000/admin/main.js:25097
(anonymous) @ http://localhost:3000/adminvendors-node_modules_payload_dist_admin_components_forms_Error_index_js-node_modules_payload_-6c3d35.js:834
(anonymous) @ http://localhost:3000/adminvendors-node_modules_payload_dist_admin_components_forms_Error_index_js-node_modules_payload_-6c3d35.js:819
callCallback @ http://localhost:3000/admin/main.js:43269
invokeGuardedCallbackDev @ http://localhost:3000/admin/main.js:43318
invokeGuardedCallback @ http://localhost:3000/admin/main.js:43380
invokeGuardedCallbackAndCatchFirstError @ http://localhost:3000/admin/main.js:43394
executeDispatch @ http://localhost:3000/admin/main.js:47567
processDispatchQueueItemsInOrder @ http://localhost:3000/admin/main.js:47599
processDispatchQueue @ http://localhost:3000/admin/main.js:47612
dispatchEventsForPlugins @ http://localhost:3000/admin/main.js:47623
(anonymous) @ http://localhost:3000/admin/main.js:47832
batchedEventUpdates$1 @ http://localhost:3000/admin/main.js:61715
batchedEventUpdates @ http://localhost:3000/admin/main.js:43069
dispatchEventForPluginEventSystem @ http://localhost:3000/admin/main.js:47831
attemptToDispatchEvent @ http://localhost:3000/admin/main.js:45329
dispatchEvent @ http://localhost:3000/admin/main.js:45248
unstable_runWithPriority @ http://localhost:3000/admin/main.js:80927
runWithPriority$1 @ http://localhost:3000/admin/main.js:50600
discreteUpdates$1 @ http://localhost:3000/admin/main.js:61732
discreteUpdates @ http://localhost:3000/admin/main.js:43080
dispatchDiscreteEvent @ http://localhost:3000/admin/main.js:45213
The text was updated successfully, but these errors were encountered: