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

500 error in JS console trying to delete an asset after 5.3.0 upgrade #10129

Closed
martyf opened this issue May 21, 2024 · 0 comments · Fixed by #10132
Closed

500 error in JS console trying to delete an asset after 5.3.0 upgrade #10129

martyf opened this issue May 21, 2024 · 0 comments · Fixed by #10132

Comments

@martyf
Copy link
Contributor

martyf commented May 21, 2024

Bug description

After upgrading to 5.3.0, selecting an Asset in a Container throws a 500 error.

{
    "message": "Class Statamic\\Http\\Controllers\\CP\\Assets\\ActionController contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Statamic\\Http\\Controllers\\CP\\ActionController::getItemData)",
    "exception": "Symfony\\Component\\ErrorHandler\\Error\\FatalError",
    "file": "/Users/Marty/Code/asseterror/vendor/statamic/cms/src/Http/Controllers/CP/Assets/ActionController.php",
    "line": 8,
    "trace": []
}

This means Assets cannot be deleted.

If you were to select an asset, across the top of the list I expect to see options, such as delete.

If you select an Asset's "..." and then select Delete, you get the same error.

This issue is not present in 5.2.0. Current workaround is to rollback to 5.2.0.

How to reproduce

  1. Install a new site
  2. Upload an asset
  3. Select the asset, or click "..." then Delete and follow the prompts

Logs

[2024-05-21 06:31:54] local.ERROR: Class Statamic\Http\Controllers\CP\Assets\ActionController contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Statamic\Http\Controllers\CP\ActionController::getItemData) {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Class Statamic\\Http\\Controllers\\CP\\Assets\\ActionController contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Statamic\\Http\\Controllers\\CP\\ActionController::getItemData) at /Users/Marty/Code/asseterror/vendor/statamic/cms/src/Http/Controllers/CP/Assets/ActionController.php:8)
[stacktrace]
#0 {main}
"}

Environment

Environment
Application Name: Statamic
Laravel Version: 11.7.0
PHP Version: 8.3.7
Composer Version: 2.7.6
Environment: local
Debug Mode: ENABLED
URL: asseterror.test
Maintenance Mode: OFF

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

Drivers
Broadcasting: log
Cache: statamic
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.3.0 Solo

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@duncanmcclean duncanmcclean changed the title [5.x] 500 error in JS console trying to delete an asset after 5.3.0 upgrade 500 error in JS console trying to delete an asset after 5.3.0 upgrade May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants