What happened?
Description
I noticed that the alternative text property on an asset volume doesn't respect the Alternative Text Translation Method the first time it is entered after uploading an image.
Steps to reproduce
- Create multiple sites with different languages
- Create a filesystem and an asset volume, add the
alt property to the field layout and set the Alternative Text Translation Method to Translate for each language.
- Go to Assets and upload an image.
- Open the asset and enter something in the alternative text field, then save the asset.
- Check the asset in each site – the alternative text will have propagated to all of them, not just those with the same language.
- Delete the alternative text in one of the sites. This will respect the translation method, the other sites with different languages will still have the alternative text entered in step 4.
- Delete the alternative text from all sites, so the asset is in the same state it was after being uploaded.
- Enter an alternative language in one site again and save. Again, now the translation method is respected.
Expected behavior
The translation method should always be respected.
Actual behavior
I'm not sure if this is an intended behaviour or a bug. It looks to me like saving an asset for the first time is treated similar to creating an entry from a draft for the first time. I know that the initial propagation for an entry will always propagate all fields to all sites regardless of their translation methods. Looks like the behavior above is the same, but for assets?
However, that doesn't really make sense to me as a developer or as an author. Assets don't have the draft/live distinctions that entries have. After upload, the asset is available and can be accessed live (if it has a public URL). From an author's perspective, the asset is in the exact same state in steps 4 and 8 in the list above. There's no way to distinguish the two states, so there's no reason they should behave differently.
So regardless of whether this is intended or a bug, I think it should be saved. After the upload, the asset should be done with their initial propagation, and the translation methods should be respected.
Looks like the title also behaves differently. Haven't tested with custom fields yet.
Craft CMS version
5.10.5
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
What happened?
Description
I noticed that the alternative text property on an asset volume doesn't respect the Alternative Text Translation Method the first time it is entered after uploading an image.
Steps to reproduce
altproperty to the field layout and set the Alternative Text Translation Method to Translate for each language.Expected behavior
The translation method should always be respected.
Actual behavior
I'm not sure if this is an intended behaviour or a bug. It looks to me like saving an asset for the first time is treated similar to creating an entry from a draft for the first time. I know that the initial propagation for an entry will always propagate all fields to all sites regardless of their translation methods. Looks like the behavior above is the same, but for assets?
However, that doesn't really make sense to me as a developer or as an author. Assets don't have the draft/live distinctions that entries have. After upload, the asset is available and can be accessed live (if it has a public URL). From an author's perspective, the asset is in the exact same state in steps 4 and 8 in the list above. There's no way to distinguish the two states, so there's no reason they should behave differently.
So regardless of whether this is intended or a bug, I think it should be saved. After the upload, the asset should be done with their initial propagation, and the translation methods should be respected.
Looks like the title also behaves differently. Haven't tested with custom fields yet.
Craft CMS version
5.10.5
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