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]: The conflict dialog for asset uploads is too easy to dismiss accidentally #14002

Closed
MoritzLost opened this issue Dec 7, 2023 · 2 comments
Assignees

Comments

@MoritzLost
Copy link
Contributor

What happened?

Description

When uploading an asset with a filename that already exists on the server, you get this warning:

craft-conflict-warning

This modal window is very important, especially when you've uploaded multiple files. Using the Keep both option will result in duplicate files, so this should require explicit confirmation.

At the moment, clicking outside the modal window will dismiss it and choose the Keep both option, without any indicator as to what happened. The duplicate asset is only shown after reloading the page manually, as dismissing the dialog doesn't trigger a refresh of the asset index. So any user would wrongly assume that clicking outside the window is equivalent to the Cancel button, where the duplicate is discarded.

This just happened to me, I had uploaded a bunch of optimized images to replace previous uploads and done something else in the meantime. When the upload was finished, I clicked on the browser window to return focus to it, but this accidentally dismissed the dialog. Now I have to manually search and delete a bunch of duplicates 🤷

Steps to reproduce

  1. Go to Assets in the CMS, select any asset volume and upload a file. Upload the same file again.
  2. When the modal window comes up, click outside it.

Expected behavior

Clicking outside the modal window should not dismiss it. The conflict should require a selection, either by selecting and confirming one of the two options, or by clicking on Cancel.

On a related note, I found it not quite clear what the Canel button would do. I would prefer a third option Abort upload (or something similar) instead.

Craft CMS version

4.5.11.1

PHP version

No response

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 Dec 8, 2023

Hi, thanks for reporting. I think that’s a good shout about preventing that modal from being dismissed, so I raised a PR for it.

On a related note, I found it not quite clear what the Canel button would do. I would prefer a third option Abort upload (or something similar) instead.

Please feel free to open a discussion about this.

@brandonkelly
Copy link
Member

Craft 4.5.12 is out with that change!

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