Description
What happened?
Description
Our installation contains multiple Sites in multiple languages (English, Dutch, French, and German) and a Single section with a required Asset field. The Single section is enabled on multiple Sites, but not the primary site. The option Validate related assets is checked for the Asset field.
The asset itself (an image) has a required custom field (for alt text). This field is translatable per language. The purpose of this setup is to ensure that content managers cannot save an entry without first adding a valid alt text to the related image.
When an image is added via a secondary site whose language (English) does not match that of the primary site (Dutch), and an alt text is correctly added in the secondary language (English), it is not possible to save the entry without first entering an alt text in the language of the primary site (Dutch).
This is problematic for content managers who are unaware of the underlying validation logic and/or who do not have the necessary permissions to add an alt text in the language of the primary site.
Steps to reproduce
- Set up two Sites in different languages. Set one as the primary site.
- Add a Single section and enable it on both sites.
- Add a required Asset field to the Single section and check the option Validate related assets.
- Add a required Plain Text field to the Asset which is translated for each language.
- Upload a new image to the Single section via the secondary site.
- Enter a value into the required Plain Text field for the Asset.
- Save the entry.
Expected behavior
Craft considers the related asset valid for the current (secondary) site and saves the entry.
Actual behavior
Craft returns a validation error.
Craft CMS version
4.5.6.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
No response