[MGNLREST-363] richTextLinkReferenceResolver doesn't resolve localised link for all languages Created: 27/Apr/22 Updated: 21/Mar/23 Resolved: 21/Mar/23 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | 2.2.12 |
| Fix Version/s: | 2.2.17 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Jonathan Ayala | Assignee: | Dai Ha |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Attachments: |
|
|||||||||||||||||||||||||
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| Template: |
|
|||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
|||||||||||||||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
|||||||||||||||||||||||||
| Date of First Response: | ||||||||||||||||||||||||||
| Epic Link: | Support | |||||||||||||||||||||||||
| Sprint: | DevX 33 | |||||||||||||||||||||||||
| Story Points: | 5 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Work Started: | ||||||||||||||||||||||||||
| Description |
|
When passing parameter lang=all in a request to a endpoint with a richTextLinkReferenceResolver, links are not resolved according to their language. Steps to reproduce
Expected resultsLinks in rich text fields are resolved for each locale Actual resultsLinks in rich text fields are not resolved for each locale: "text": "<p>this is a test <a href=\"/magnoliaAuthor/visit-finland.html\">link</a></p>\n", "text_de": "<p>this is a test <a href=\"/magnoliaAuthor/visit-finland.html\">link</a> GERMAN</p>\n", However, sending a request with lang=de: http://localhost:8080/magnoliaAuthor/.rest/delivery/testEndpoint/v1?lang=de "text": "<p>this is a test <a href=\"/magnoliaAuthor/de/visit-finland.html\">link</a> GERMAN</p>\n", returns a correctly resolved link with the locale in the URL. |
| Comments |
| Comment by Marek Strucka [ 02/Sep/22 ] |
|
The issue has been successfully reproduced by creating a light module and debugged. The problem lies in wrongly resolving the richtext and the transformer getting a wrong locale information, namely: |