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
In version 3.2.0 publish fails if non-repeateable component data is "null" #8221
Comments
Hi, thanks for the notice. This issue is a duplicate of #8220. I'm going to close this one :) |
Sorry, I've searched through the issues, but missed that one 🙈 |
… is "null" (#8222) Signed-off-by: Stanko <stanko.tadic@gmail.com>
Not related to the issue anymore since it has been resolved - @Stanko i ran into the same issue last night and struggled a lot debugging it because strapi code is always minified. I couldn't even add I can see you didn't have the problem. Wondering how that was the case as it would help me in the future contributing more thoroughly to the project? |
Hey @hadynz, code is minified, but strapi team provides source maps as well. When error happens, development tools (I use firefox) will show you exactly in which file it happened. Then you can edit it in the node modules, but this can be cumbersome as you need to restart the app. Or just copy the file to your project's folder, check the official documentation: https://strapi.io/documentation/v3.x/admin-panel/customization.html#development-mode Now strapi will use the local file instead of the one from the node modules, and you can patch the bug locally. Then I just take that patch and create a PR back to this repo. Hope that helps, cheers! EDIT: I think you have to use strapi's development mode |
Describe the bug
When trying to publish an entity that has non-repeateable component and component is not filled in, publish fails with an error.
I'll open a PR in a minute.
Steps to reproduce the behavior
In the Content-Types Builder:
publish-test-component
)PublishTest
)name
- text fieldcomponent
- select the component we createdpublish-test-component
, and for the "Type" select "Single Component"Go and create a new
PublishTest
:name
fieldExpected behavior
Page is published with no errors.
Screenshots
Dummy collection type I created for this test, it is important that the component's type is set to "Single Component":
When hitting publish, if component has no data, publish fails:
As you can see, data is
null
andObject.keys(data)
on line 5 fails:System
I don't think these matter, but still I filled it in:
The text was updated successfully, but these errors were encountered: