UVE: Image management issue with language toggle for secondary languages
Parent Issue
No parent issue identified.
Problem Statement
There is an error when using the language toggle to manage images for a secondary language. For example, in the case of the "banner" content type, when an image is added to the primary language, it displays correctly. However, when an image is added to a secondary language, it does not appear. Although switching between pages works correctly, there is a bug in managing the image for the secondary language. This issue occurs consistently across all three supported browsers: Chrome, Firefox, and Edge.
Steps to Reproduce
- Deploy the dotCMS instance using the Docker image
dotcms/dotcms:trunk_fbad538. - Open the dotCMS instance.
- Navigate to a "banner" content type and add an image in the primary language.
- Verify that the image displays correctly.
- Switch to a secondary language using the language toggle.
- Add an image for the secondary language.
- Observe that the image does not display.
Acceptance Criteria
- When adding an image to a secondary language for a content type (e.g., "banner"), the image should:
- Display correctly in the secondary language view.
- Be managed properly without any errors or discrepancies between languages.
- Ensure that the language toggle functionality works seamlessly with images.
dotCMS Version
Tested with Docker image dotcms/dotcms:trunk_fbad538.
Proposed Objective
User Experience
Proposed Priority
Priority 2 - Important
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
- Attached video showing the issue with image management when switching languages.
https://github.com/user-attachments/assets/7932ef5b-c45e-4d1a-888e-1a1a8acc2335
Assumptions & Initiation Needs
- Ensure that the environment is set up to manage multiple languages.
- Confirm that the content type ("banner") and images are available for testing in multiple languages.
Quality Assurance Notes & Workarounds
No workaround is currently available. The issue persists when attempting to manage images for secondary languages.
Sub-Tasks & Estimates
- [ ] Investigate the cause of the image not displaying when added to a secondary language.
- [ ] Identify and implement a fix to ensure images are managed correctly across all languages.
- [ ] Test the fix across all supported browsers: Chrome, Firefox, and Edge.
Probably something in our example image component, please check in Angular and Astro as well.
Note to QA: Please, additionally test case # 30 of the Regression Tests spreadsheet
PRs:
- https://github.com/dotCMS/core/pull/30561
- https://github.com/dotCMS/core/pull/30587
Note to QA:
We have fixed the fallback mechanism to default language if an image or file associated with a contentlet does not exist in the contentlet's current language.
To test this:
- Ensure that the
DEFAULT_FILE_TO_DEFAULT_LANGUAGEproperty is set totruein the environment configuration. - Create a Spanish version of a contentlet with an Image Field. Select an image that doesn’t have a Spanish version.
- Add the contentlet to a Spanish page.
- Verify that the contentlet-associated image displays properly.
IQA Passed
Now the image can be accessed even if we do not have a version for the specified language
DotCMS Docker Image: [dotcms/dotcms:trunk_9269649]
Screenshot
https://github.com/user-attachments/assets/26942a57-019c-4bc9-a232-fda6f834813f
We need some work here:
I noticed there have been some changes after the IQA. Hopefully not, but these changes could potentially break some functionality
There’s a comment about retesting the specific test cases for this functionality in the provided CSV, but we haven’t updated the actual test results after this fix
IQA Passed
Results for Test Case #30
Headless
https://github.com/user-attachments/assets/ea009e50-abec-4945-96af-3074fa5c32e3
Traditional
https://github.com/user-attachments/assets/7002f84f-2a98-44f8-9eaf-03fdfb413ea5
Note to QA
In the headless version, images may fail even if the image exist in the specified language, our way to manage images in the examples it's too naive and it's not bulletproof. We are aware of this problem and we will take care of it in this ticket https://github.com/dotCMS/core/issues/30717
we can pass this one for now, but will need be retested after the fix the #30717