statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.05k stars 531 forks source link

Unable to remove image from assets fieldtype [4.0] #7878

Closed MrMooky closed 1 year ago

MrMooky commented 1 year ago

Bug description

I created a simple Global with an image field. I am able to add an image, but I cannot remote it anymore. No errors, also not in the logs. Clicking the trash icon does not trigger anything.

Screenshot 2023-04-08 at 18 34 58

How to reproduce

Create this Global, add an image and save it. Then try to remove the image.

tabs:
  main:
    display: Main
    sections:
      -
        fields:
          -
            handle: title
            field:
              input_type: text
              antlers: false
              type: text
              display: Title
              icon: text
              listable: hidden
              instructions_position: above
              visibility: visible
              hide_display: false
          -
            handle: image
            field:
              max_files: 1
              mode: list
              container: images
              restrict: false
              allow_uploads: true
              show_filename: true
              type: assets
              display: Image
              icon: assets
              listable: hidden
              instructions_position: above
              visibility: visible
              hide_display: false
          -
            handle: text
            field:
              buttons:
                - h2
                - h3
                - bold
                - italic
                - unorderedlist
                - orderedlist
                - removeformat
                - quote
                - anchor
              smart_typography: false
              save_html: false
              inline: false
              toolbar_mode: fixed
              reading_time: false
              fullscreen: true
              allow_source: true
              enable_input_rules: true
              enable_paste_rules: true
              remove_empty_nodes: false
              antlers: false
              link_noopener: false
              link_noreferrer: false
              target_blank: false
              type: bard
              display: Text
              icon: bard
              listable: hidden
              instructions_position: above
              visibility: visible
              hide_display: false
          -
            handle: link
            field:
              type: link
              display: Link
              icon: link
              listable: hidden
              instructions_position: above
              visibility: visible
              hide_display: false

Logs

No response

Environment

Application Name: eniston
Laravel Version: 10.6.2
PHP Version: 8.1.16
Composer Version: 2.5.4
Environment: local
Debug Mode: ENABLED
URL: eniston.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single, bugsnag
Mail: postmark
Queue: sync
Scout: algolia
Session: file

Statamic
Addons: 0
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.0.0-alpha.2 Solo

Installation

Existing Laravel app

Antlers Parser

runtime (new)

Additional details

No response

jasonvarga commented 1 year ago

This was not specific to globals at all. It was just the assets field used anywhere.

Fixed in #7907