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

Error when deleting assets "foreach () argument must be of type array object, string given" #8114

Closed
marflow opened this issue May 11, 2023 · 4 comments
Labels

Comments

@marflow
Copy link

marflow commented May 11, 2023

Bug description

When trying to delete or move one or several images (via checkboxes or dot dropdown option) I got an error foreach () argument must be of type array object, string given.

Likely related to #7555, this does not seem an edge case however.

When trying bulk deletion with checkboxes the first image is deleted though. Same when delting a single assets. Reloading the list shows it is gone.

How to reproduce

Navigate to Assets and delete assets from an assets list. Or click on nav option "move" to move assets to another folder

Logs

No response

Environment

Existing Statamic multisite, updated from 3.4 to 4.0, MacOS Ventura, DDEV.

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

runtime (new)

Additional details

No response

@geertjanknapen1
Copy link

I can confirm this also happens on 3.4.7 and 4.0 for me as well on Linux.

The exact same error throws when moving an asset in CP.
And I get a Call to a member function filename() on null when renaming the file.

The thing is, after pressing cancel and then reloading CP the actions have been performed. I don't know if you see that behaviour as well @marflow ?

@marflow
Copy link
Author

marflow commented May 24, 2023

I don´t get the same message as you @geertjanknapen1 , but the action (renaming, deleting) is done nevertheless on one file. CP is updated with new filename after reload.

@jasonvarga jasonvarga changed the title Error when deleting assets in 4.0 "foreach () argument must be of type array object, string given" Error when deleting assets "foreach () argument must be of type array object, string given" May 26, 2023
@duncanmcclean
Copy link
Member

Duplicate of #7547 - closing in favour of that issue.

@Swennet
Copy link

Swennet commented Sep 19, 2023

Same issue here when renaming or deleting assets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants