[MULTISITE-33] All the href link is incorrect on mobile if change server>admin=false Created: 21/Nov/14 Updated: 16/Feb/15 Resolved: 16/Feb/15 |
|
| Status: | Closed |
| Project: | Magnolia Multisite Module |
| Component/s: | None |
| Affects Version/s: | 1.1.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Nguyen Ky Thanh | Assignee: | Unassigned |
| Resolution: | Workaround exists | Votes: | 0 |
| Labels: | framework | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
all mobile devices and simulator. |
||
| 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
|
||||
| Date of First Response: | |||||
| Description |
|
When change configuration server>admin=false. => It automatically add the ip (or localhost) to the link as prefix. |
| Comments |
| Comment by Jan Haderka [ 21/Nov/14 ] |
|
Is that happening only on the cell phone or in preview as-if-on-cell-phone done on the desktop? |
| Comment by Nguyen Ky Thanh [ 21/Nov/14 ] |
|
When change server>admin=false => it happens on both. Thank you. |
| Comment by Nguyen Ky Thanh [ 21/Nov/14 ] |
|
I use the function: templatingFunctions.link() |
| Comment by Jan Haderka [ 21/Nov/14 ] |
|
can you try to open Configuration app and change /server/rendering/linkManagement@makeBrowserLinksRelative to true and see what happens? |
| Comment by Nguyen Ky Thanh [ 21/Nov/14 ] |
|
Hi Jan, it still happens. Nothing changes. |
| Comment by Jan Haderka [ 21/Nov/14 ] |
|
What you ultimately end up using is info.magnolia.link.LinkUtil.createLink(Node) which in turn will call LinkTransformerManager.getInstance().getBrowserLink(node.getPath()).transform(createLinkInstance(node)); The reason why you see it in preview is (iirc) because preview is done in iframe and thus needs to create full url. Why you see it also on the phone is weird and should not be the case. I can imagine that by switching admin mode to false, the version of the page generated for preview ends up in the cache and is then served to phone as well, but maybe I'm wrong here and there is some other issue at play. Best would be to put a breakpoint in LinkTransformerManager.getBrowserLink(String) and see what it resolves when. There are different types of link producers that this method can return and it seem to be resolving wrong one. If you find that method to be a source of issue, you can customise link transformer manager and use that until the bug itself can be fixed. To set customised LTM to use, just set it in config:/server/rendering/linkManagement/class. |
| Comment by Nguyen Ky Thanh [ 21/Nov/14 ] |
|
Thank you Jan, I will try to resolve it. |
| Comment by Nguyen Ky Thanh [ 21/Nov/14 ] |
|
One more thing, I am using the enterprise version. |
| Comment by Jan Haderka [ 21/Nov/14 ] |
|
which messes up things even more |
| Comment by Nguyen Ky Thanh [ 21/Nov/14 ] |
|
Yes, please help to move it to multisite jira. Here is my debug tracking:
Thank you Jan. |
| Comment by Nguyen Ky Thanh [ 21/Nov/14 ] |
|
I've already post the bug to multisite module. |
| Comment by Jan Haderka [ 21/Nov/14 ] |
|
I moved it. If there's other issue, pls link them together. |
| Comment by Nguyen Ky Thanh [ 28/Nov/14 ] |
|
Hi @Jan, Thank you. |
| Comment by Nguyen Ky Thanh [ 03/Feb/15 ] |
|
Dear @Jan, Magnolia Team I posted this issue long time ago, but until today I still cannot know the status of issue or any feedback from magnolia team. Thank you so much |
| Comment by Philip Mundt [ 05/Feb/15 ] |
|
Hi Nguyen. This look to be related to See also: Kind regards |
| Comment by Philip Mundt [ 05/Feb/15 ] |
|
I closed MULTISITE-32 as duplicate. |
| Comment by Nguyen Ky Thanh [ 05/Feb/15 ] |
|
Dear @Philip Mundt, Thank you for your response, I also have found the rood cause of this issue. Thank again. |
| Comment by Philip Mundt [ 05/Feb/15 ] |
|
Hey Nguyen. Yes, that is a known limitation (see SUPPORT-3834, related to Does that "fix" your problem? Regards |
| Comment by Nguyen Ky Thanh [ 07/Feb/15 ] |
|
Thanks Philip, |
| Comment by Philip Mundt [ 16/Feb/15 ] |
|
Closing this issue because a workaround exists: Providing a domain-mapping in the site configuration solves the problem. A link (of the current site) is handled as an internal link when:
|