- Issue created by @balintbrews
- Merge request !655#3506424: Loading and auto-saving an edited code component โ (Merged) created by Unnamed author
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
balintbrews โ credited larowlan โ .
- ๐บ๐ธUnited States effulgentsia
balintbrews โ credited effulgentsia โ .
- ๐ณ๐ฑNetherlands balintbrews Amsterdam, NL
Crediting @effulgentsia for suggesting to use default config for the asset library storing the global CSS.
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
When I try to publish this, I get an error from the publish endpoint
'This value should not be blank'
Here's the detail
"detail": "This value should not be blank.", "source": { "pointer": "name" }, "meta": { "entity_type": "js_component", "entity_id": "garry", "label": "Garry", "autosave_key": "js_component:garry" } }
Will try to fix it
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
Creating a new component
1) Name is sent
2) Create another component
2) GET request starts but is aborted
3) PATCH request runs but sends the value of name
4) Name is now set to old value
I think the same thing is occurring with a clean state - but instead of sending the old component name, it is sending an empty value.
I think we can fix this in the 'create component' dialog, going to try that
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
The issue isn't coming from the add dialog, its from the code added here.
Because we save an autosave entry before we get data from the backend, we are relying on the name from code editor slice.
This is empty if the component is new and the first component created here.
It is the name of the previously edited component if not the first one.I think this highlights the brittleness of the 204 from the backend and we should reconsider a 307 so that the fetch always gets some data.
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
wim leers โ made their first commit to this issueโs fork.
-
balintbrews โ
committed c84110f2 on 0.x
Issue #3506424 by balintbrews, larowlan, wim leers, effulgentsia:...
-
balintbrews โ
committed c84110f2 on 0.x
Automatically closed - issue fixed for 2 weeks with no activity.