Skip to content
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

Issue with carbon field media_gallery after image is deleted from wordpress media library #1256

Open
uldisrudzitis opened this issue Sep 20, 2024 · 0 comments

Comments

@uldisrudzitis
Copy link

Version

  • Carbon Fields: v3.6.5
  • WordPress: 6.6.1
  • PHP: 8.2

Expected Behavior

After deleting the image from wordpress media library the deleted image should disappear from carbon field media_gallery in the list.

Actual Behavior

After deleting the image from wordpress media library image in the carbon field media_gallery stays in the list as empty container even without the ability to delete it.

Screenshot 2024-09-20 at 09 05 32

Container definition

Field::make('media_gallery', 'gallery', __('Gallery'))->set_type(['image']),

Steps to Reproduce the Problem

  1. Choose the existing image from Wordpress media library using carbon field media_gallery and save the data.
  2. Delete the chosen image from Wordpress media library
  3. Check the saved data with carbon field media_gallery - empty grey container.

Comments

At least add the option to delete the non existing attachments. Auto remove from all the media_gallery lists would be perfect!

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

No branches or pull requests

1 participant