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

[4.x]: Duplicate file name issues are not displayed in modal windows #14329

Closed
MoritzLost opened this issue Feb 8, 2024 · 2 comments
Closed
Assignees

Comments

@MoritzLost
Copy link
Contributor

What happened?

Description

I'm seeing an issue where errors on the filename field are not reported when an asset is being edited in a modal window.

When trying to change the filename to a filename that already exists in the same folder, we get an error message below the filename input:

Screenshot 2024-02-08 at 15 13 20

But when editing the same asset in a modal window from an entry form, the validation error is not displayed after trying to save:

Screenshot 2024-02-08 at 15 13 08

I've checked the response in the network request, it correctly includes a newLocation error and an errorSummary with an appropriate message. Only they're not getting displayed, all we get is the generic Couldn’t save asset. message on the bottom left.

Steps to reproduce

  1. Open an asset in a modal window from an entry form.
  2. Change the filename to a filename that's already used by another asset in the same folder and try to save.

Expected behavior

All validation messages should be displayed in a modal context.

Actual behavior

The validation error message is missing.

Craft CMS version

4.7.1

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@i-just
Copy link
Contributor

i-just commented Feb 9, 2024

Hi, thanks for reporting! I raised a PR for this.

(Also, error reporting in slideouts has been further improved in v5.)

@brandonkelly
Copy link
Member

Craft 4.7.3 is out with the fix for this. Thanks again!

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

No branches or pull requests

3 participants