Skip to content

Fix nested images on update#41

Closed
onemoreahmad wants to merge 2 commits intowhitecube:masterfrom
onemoreahmad:master
Closed

Fix nested images on update#41
onemoreahmad wants to merge 2 commits intowhitecube:masterfrom
onemoreahmad:master

Conversation

@onemoreahmad
Copy link
Contributor

This is a fix for the issue mentioned here #35

@voidgraphics
Copy link
Member

Truly a lifesaver, thanks for taking the time to tackle this. We'll review it asap. 👍

@toonvandenbos
Copy link
Member

Hi @onemoreahmad,

Thanks a lot for the PR! I took a look at it and it could've been merged after a little cleanup, but then I realized the problem you're solving came from another issue, earlier in the execution stack.

Latest tests after fixing it seem positive, meaning we were able to solve the issue in a cleaner way.

For your information, File fields have a built-in mechanism for avoiding to overwrite their values with null on update. Weirdly enough, the issue we were facing here was not directly related to Image fields.

Thanks again, hope to hear your feedback soon! :)

@thisprojectworks
Copy link

I still have the problem, the problem is occurring when I use an Image Field inside A Flexible Field inside the Nova Settings package. If I use in a model, works well. If I save for first time everything works correctly and the images are saved on the disk and in the json field. But If I let empty the Image field with a previous image saved, the field image is removed from the json of the Flexible content, both key and value.

Laravel 11
whitecube/nova-flexible-conten 1.1
outl1ne/nova-settings 5.2

jordyvanderhaegen pushed a commit to esign/nova-flexible-content that referenced this pull request Dec 4, 2024
…npm_and_yarn/laravel-mix-6.0.17

Bump laravel-mix from 6.0.16 to 6.0.17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants