[MULTISITE-28] By usage of smartphone variation, all links are created as external links, in sites with no domain configured Created: 13/Aug/14  Updated: 07/May/15  Resolved: 16/Sep/14

Status: Closed
Project: Magnolia Multisite Module
Component/s: None
Affects Version/s: 1.0.6, 1.1
Fix Version/s: 1.0.7, 1.1.2

Type: Bug Priority: Neutral
Reporter: Christian Ringele Assignee: Philip Mundt
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MGNLETK-111 By usage of smartphone variation, all... Closed
Relates
relates to MAGNOLIA-6199 Comparison of two proxied objects doe... Closed
relation
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   

As for M5 the mutisite module is the successor of the ETK module, I created this issue.
It is a "clone" of MGNLETK-111.

Same content/description is valid:
"If you are using a variation on site definition like the smartphone variation, all links on the smartphone view are rendered as external (complete with host) links.

The reason for this bug is, that the SiteMergeFilter creates site proxies, if a variation is used. The equals comparison in the CompoundLinkTransformer fails on usage with site proxies. And so the link transformer creates external link for links in same site, too.
(Specifically isTargetExternal returns true, so 'result = linkManager.getCompleteUrl().transform(link);' is the result.)

To reproduce this issue create a new home page and view the source code of the smartphone preview iframe."

Note that this is only only occurs with pages in sites that have no domain configured, such as the stock default site.



 Comments   
Comment by Christian Ringele [ 13/Aug/14 ]

Same behavior also in M5

Comment by Christian Ringele [ 13/Aug/14 ]

Should be solved for ETK and mutlisite module

Comment by Federico Grilli [ 01/Sep/14 ]

Waiting for customer feedback on proposed solution. See also MGNLETK-111

Comment by Christopher Zimmermann [ 03/Sep/14 ]

Can be closed as non-issue once properly documented: The site name is included only when domain is not configured properly.

Comment by Antti Hietala [ 05/Sep/14 ]

Documented a best practice about creating a specific site definition.
https://documentation.magnolia-cms.com/display/DOCS/Multisite#Multisite-Defaultsitedefinition

Comment by Christopher Zimmermann [ 09/Sep/14 ]

In CompoundLinkTransformer#isTargetExternal compare the names of sites rather then their objects to cover the corner case of variants of a page on the default site.

Comment by Christopher Zimmermann [ 16/Sep/14 ]

Looks good - as the dummyValue and themeReference are not used in the two tests, please remove them so that the tests are simpler and more readable.

testLinkTransformationWhenSiteHasVariation
testLinkTransformationWhenSiteHasVariationAndDomains

Generated at Mon Feb 12 06:05:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.