[MGNLREST-345] JcrReferenceResolverDefinition wrongly generating links for cross site and self Created: 03/Feb/22 Updated: 01/Jun/23 Resolved: 01/Jun/23 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | 2.2.16 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Bartosz Staryga | Assignee: | Dai Ha |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: | |||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Release notes required: |
Yes
|
||||||||
| Documentation update required: |
Yes
|
||||||||
| Date of First Response: | |||||||||
| Epic Link: | Support | ||||||||
| Team: | |||||||||
| Work Started: | |||||||||
| Description |
| Comments |
| Comment by Viet Nguyen [ 14/Feb/23 ] |
|
Set property referenceRepeat to "true" in your JcrDeliveryEndpointDefinition for link to self generating. |
| Comment by Dai Ha [ 22/May/23 ] |
|
Hi a viet.nguyen , bstaryga , I am trying to reproduce this issue. Locally, I am using travel and sportation sites for cross-site references. I make a travel page with link property to sportation page. This is what I got from the query:
{
"@name":"test3",
"@path":"/travel/test3",
"@id":"92fe1f13-1c76-4586-bc29-b976e6c0c28e",
"@nodeType":"mgnl:page",
"link":"http://sportstation.magnolia-cms.com/about.html",
"newHeader":true,
"@nodes":[
]
}
The link is resolved correctly with ootb usage - do you happen to have the setup with issue that I can take a look? maybe the referenced site does not have domain mapping so it fallback to localhost?
|
| Comment by Dai Ha [ 24/May/23 ] |
|
Here is one sample for the usage of referenceRepeat property:
{
"@name":"test4",
"@path":"/travel/test4",
"@id":"6c1d35d0-32b7-4aed-a31d-567b2cf61810",
"@nodeType":"mgnl:page",
"link":"http://travel-demo.magnolia-cms.com/test4.html",
"newHeader":false,
"@nodes":[
]
}
As discussed with a viet.nguyen yesterday, we will not change the property name because of the deep history of its usage - it will either required customer to adjust all of their config or increase the complexity in the implementation (also, so far no complaint on its name). In additional, we will not change default value referenceRepeat=true also, because it will trigger more processing by default which is not always required by client's system.
|
| Comment by Dai Ha [ 24/May/23 ] |
|
Hi tobias.kerschbaum, bstaryga and I have agreed on the solutions as below:
I will have someone in devX to verify (qa) the discovery result again. We will need to improve the docs on the usage of referenceRepeat, maybe by adding an example, mdrapela? |
| Comment by Robert Šiška [ 30/May/23 ] |
|
Can confirm, that the reference-resolving mechanism works correctly as designed. I would agree that the documentation of reference resolvers isn't very clear about the referenceRepeat tip. Maye it could be more clear about where is it supposed to be defined (on endpoint definition level, not reference resolver definition level) Not having site mappings for a certain site should (and in my case does) correctly resolve with fallback site as "http://localhost:8080/magnoliaAuthor/fallback/basic.html" |