You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #8974 was implemented in 6764c9a, saving an edited image as a new asset via an image editor opened via a selected image in an assets field, is supposed to replace the original, selected asset in that field.
This feature was apparently broken at some point during the beta, then fixed for Craft 4.0.0-beta.3 via 40cc20e – but it still doesn't appear to actually work as of Craft 4.2.1.1.
Unfortunately I couldn't get Craft 4.0.0-beta.3 to work, but I did test on Craft 4.0.0-RC1 and it was the same there – so not sure if this has ever worked reliably? :)
Steps to reproduce
Upload an image to a volume. The volume uses a filesystem with URLs, in case that matters.
Add an assets field to an entry type field layout.
Create an entry, and add the image to the assets field. Save the entry.
In the entry's edit page; double-click the selected asset in the assets field. Then, click the "Edit Image" button on top of the thumbnail image in the asset slideout.
Edit the image (e.g. by rotating it) in the Image Editor, then click "Save as a new asset".
Expected behavior
When the image editor closes after saving the new asset, the originally selected asset in the assets field should be swapped out with the newly-saved, edited image (and a provisional draft should be created/saved for the entry containing the field).
(Sidenote: I guess ideally the asset slideout should also be updated to edit the newly-saved, edited image instead of the original asset – otherwise authors might be confused if they continue editing custom fields, alternative text etc. and it saves to the asset that is no longer selected in the field.)
Actual behavior
The original asset is retained in the asset field and slideout; i.e. it still works just like in Craft 3. No JS errors in the dev console.
Craft CMS version
4.2.1.1
PHP version
8.1.8
Operating system and version
macOS 12.4
Database type and version
10.8.3-MariaDB
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-29)
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered:
It was originally added via 6764c9a, but then had to be re-implemented for the new unified element editor via 40cc20e, but then I accidentally removed a critical part of it when implementing element auto-refreshing.
Brought that line back for the next release, and now it’s working as intended now.
What happened?
Description
Since #8974 was implemented in 6764c9a, saving an edited image as a new asset via an image editor opened via a selected image in an assets field, is supposed to replace the original, selected asset in that field.
This feature was apparently broken at some point during the beta, then fixed for Craft 4.0.0-beta.3 via 40cc20e – but it still doesn't appear to actually work as of Craft 4.2.1.1.
Unfortunately I couldn't get Craft 4.0.0-beta.3 to work, but I did test on Craft 4.0.0-RC1 and it was the same there – so not sure if this has ever worked reliably? :)
Steps to reproduce
Expected behavior
When the image editor closes after saving the new asset, the originally selected asset in the assets field should be swapped out with the newly-saved, edited image (and a provisional draft should be created/saved for the entry containing the field).
(Sidenote: I guess ideally the asset slideout should also be updated to edit the newly-saved, edited image instead of the original asset – otherwise authors might be confused if they continue editing custom fields, alternative text etc. and it saves to the asset that is no longer selected in the field.)
Actual behavior
The original asset is retained in the asset field and slideout; i.e. it still works just like in Craft 3. No JS errors in the dev console.
Craft CMS version
4.2.1.1
PHP version
8.1.8
Operating system and version
macOS 12.4
Database type and version
10.8.3-MariaDB
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-29)
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered: