<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 01:47:48 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MGNLETK-29] LinkUtil fails to generate links in the multi site environment</title>
                <link>https://jira.magnolia-cms.com/browse/MGNLETK-29</link>
                <project id="10290" key="MGNLETK">Extended Templating Kit (closed)</project>
                    <description>&lt;p&gt;Inside my AbstractSyndFeedGenerator implementation I run a query on some content nodes, and then for each node create a SyndEntry where I use info.magnolia.link.LinkUtil.createAbsoluteLink(content) to create the rss item link. This causes a stack trace, which I include.&lt;/p&gt;

&lt;p&gt;I traced the problem to info.magnolia.module.extendedtemplatingkit.CrossSiteAbsolutePathTransformer.prefixLink(String linkStr). &lt;br/&gt;
This method is quite complicated, but I can guess what goes wrong: &lt;br/&gt;
Because the request is on &lt;a href=&quot;http://tegenlicht.localhost:8080/rss/?generatorName=tegelicht-nieuws&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://tegenlicht.localhost:8080/rss/?generatorName=tegelicht-nieuws&lt;/a&gt; it is not a request on the website workspace and the site is not resolved in the course of the request handling, so the configuration is not part of the request context.&lt;/p&gt;

&lt;p&gt;I had some communication about this with Jan, who suggested I should use LinkUtil.createExternalLink(). But this method does not know how to resolve the hostname (based on multi site configuration), and it also does not know how the links to pages in the site should be created.&lt;/p&gt;

&lt;p&gt;I hope this information is sufficient. If not, i will supply what is required.&lt;/p&gt;</description>
                <environment></environment>
        <key id="18505">MGNLETK-29</key>
            <summary>LinkUtil fails to generate links in the multi site environment</summary>
                <type id="1" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10883&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="had">Jan Haderka</assignee>
                                    <reporter username="ebunders">Ernst Bunders</reporter>
                        <labels>
                            <label>multisite</label>
                            <label>vpro</label>
                    </labels>
                <created>Tue, 25 May 2010 17:19:49 +0200</created>
                <updated>Thu, 3 Jul 2014 16:40:24 +0200</updated>
                            <resolved>Mon, 7 Jun 2010 11:30:51 +0200</resolved>
                                    <version>1.3.1</version>
                                    <fixVersion>1.3.1</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="28475" author="ebunders" created="Wed, 26 May 2010 10:15:21 +0200"  >&lt;p&gt;Some files that demonstrate what code causes our problem with the rss. &lt;/p&gt;</comment>
                            <comment id="28476" author="ebunders" created="Wed, 26 May 2010 10:54:58 +0200"  >&lt;p&gt;for completeness: the configuration xml&lt;/p&gt;</comment>
                            <comment id="28485" author="had" created="Wed, 26 May 2010 17:19:38 +0200"  >&lt;p&gt;This issue is fixed by changes made for &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-3213&quot; title=&quot;MagnoliaTemplatingUtilities do not support creation of cross site links&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-3213&quot;&gt;&lt;del&gt;MAGNOLIA-3213&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MGNLETK-28&quot; title=&quot;multi-site support: fixing various issues in the new &quot; class=&quot;issue-link&quot; data-issue-key=&quot;MGNLETK-28&quot;&gt;&lt;del&gt;MGNLETK-28&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
I will try to deploy a snapshot in the morning with the fixes for testing.&lt;/p&gt;</comment>
                            <comment id="28486" author="had" created="Thu, 27 May 2010 09:39:50 +0200"  >&lt;p&gt;All the issues are still undergoing testing, but if you want to test as well (and I would really appreciate that):&lt;br/&gt;
&lt;a href=&quot;http://repo.magnolia-cms.com/sites/repo/snapshots/info/magnolia/magnolia-core/4.3.2-SNAPSHOT/magnolia-core-4.3.2-20100527.072507-5.jar&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;magnolia-core&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://repo.magnolia-cms.com/sites/repo/snapshots/info/magnolia/magnolia-module-templating/4.3.2-SNAPSHOT/magnolia-module-templating-4.3.2-20100527.073442-4.jar&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;magnolia-module-templating&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://repo.magnolia-cms.com/sites/repo/snapshots/info/magnolia/magnolia-module-standard-templating-kit/1.3.1-SNAPSHOT/magnolia-module-standard-templating-kit-1.3.1-20100527.073700-7.jar&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;STK&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://repo.magnolia-cms.com/sites/repo/enterprise-snapshots/info/magnolia/magnolia-module-extended-templating-kit/1.3.1-SNAPSHOT/magnolia-module-extended-templating-kit-1.3.1-20100527.074050-12.jar&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ETK&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks Jan&lt;/p&gt;</comment>
                            <comment id="28503" author="ebunders" created="Fri, 28 May 2010 16:09:37 +0200"  >&lt;p&gt;Yes, the rss seems to be working again, calling:&lt;br/&gt;
&amp;gt; &lt;a href=&quot;http://localhost:8080/rss/?generatorName=tegenlicht-nieuws&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/rss/?generatorName=tegenlicht-nieuws&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and using:&lt;br/&gt;
        String link = LinkUtil.createAbsoluteLink(content);&lt;br/&gt;
        StringBuilder sb = new StringBuilder(&quot;http://&quot;);&lt;br/&gt;
        HttpServletRequest req = MgnlContext.getWebContext().getRequest();&lt;br/&gt;
        sb.append(req.getServerName());&lt;br/&gt;
        if(req.getServerPort() != 80) &lt;/p&gt;
{
            sb.append(String.format(&quot;:%s&quot;, &quot;&quot; + req.getServerPort()));
        }
&lt;p&gt;        sb.append(link);&lt;br/&gt;
        return sb.toString();&lt;/p&gt;

&lt;p&gt;this creates a link like:&lt;br/&gt;
&amp;gt;&lt;a href=&quot;http://localhost:8080/pip/nieuws/2010/februari/metropolis-correspondenten-gingen-op-zoek-naar-de-woede.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/pip/nieuws/2010/februari/metropolis-correspondenten-gingen-op-zoek-naar-de-woede.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I use LinkUtil.createExternalLink(content), I see that the link is created with the hostname linked to the site, like:&lt;br/&gt;
&amp;gt;&lt;a href=&quot;http://tegenlicht.localhost/nieuws/2010/februari/metropolis-correspondenten-gingen-op-zoek-naar-de-woede.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://tegenlicht.localhost/nieuws/2010/februari/metropolis-correspondenten-gingen-op-zoek-naar-de-woede.html&lt;/a&gt;&lt;br/&gt;
I just wonder what happens when you add more than one hostname to a site.... So I guess your idea of  creating a version of this method that accepts a host name as well is perhaps not so bad.&lt;/p&gt;

&lt;p&gt;One remark: port numbers are ignored, so if you run the app on a non-standard (80) port, the links won&apos;t work. Not a big deal, but worth mentioning.&lt;/p&gt;

&lt;p&gt;I also tried both variations from:&lt;br/&gt;
&amp;gt;&lt;a href=&quot;http://tegenlicht.localhost:8080/rss/?generatorName=tegenlicht-nieuws&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://tegenlicht.localhost:8080/rss/?generatorName=tegenlicht-nieuws&lt;/a&gt;&lt;br/&gt;
and it all works.&lt;/p&gt;

&lt;p&gt;But.....&lt;br/&gt;
Link creation int the site is broken again.... If i try to open my site from the admin central that is not bound to a host name:&lt;br/&gt;
&amp;gt;&lt;a href=&quot;http://localhost:8080/tegenlicht.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/tegenlicht.html&lt;/a&gt;&lt;br/&gt;
The link to a section (news) looks like: &lt;br/&gt;
&amp;gt;&lt;a href=&quot;http://localhost:8080/nieuws.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/nieuws.html&lt;/a&gt;&lt;br/&gt;
That had been fixed, and should be&lt;br/&gt;
&amp;gt;&lt;a href=&quot;http://localhost:8080/pip/nieuws.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/pip/nieuws.html&lt;/a&gt;&lt;br/&gt;
where pip is the site definition name.....&lt;/p&gt;

&lt;p&gt;When i open the site like&lt;br/&gt;
&amp;gt;&lt;a href=&quot;http://tegenlicht.localhost:8080/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://tegenlicht.localhost:8080/&lt;/a&gt;&lt;br/&gt;
it works ok.&lt;/p&gt;</comment>
                            <comment id="28505" author="had" created="Fri, 28 May 2010 16:24:41 +0200"  >&lt;p&gt;Actually you should use the &lt;tt&gt;LinkUtil.createExternalLink(Content)&lt;/tt&gt; since it is now site aware and will generate the complete URL for you. As for the port, in the domain configuration in your site you can now (apart from the &lt;tt&gt;name&lt;/tt&gt; of the domain) specify &lt;tt&gt;port&lt;/tt&gt;, &lt;tt&gt;protocol&lt;/tt&gt; and &lt;tt&gt;context&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;If you have more then one domain, the one matching the current domain will be used. If none matches the current, the first one will be used.&lt;/p&gt;</comment>
                            <comment id="28542" author="ebunders" created="Tue, 1 Jun 2010 17:17:31 +0200"  >&lt;p&gt;I just checked the links again, and can report that both in the rss feeds and in the site (when opened from admin central) work ok.&lt;br/&gt;
Snapshots i&apos;m on right now:&lt;/p&gt;

&lt;p&gt;magnolia-core-4.3.2-20100528.163321-7.jar&lt;br/&gt;
magnolia-module-standard-templating-kit-1.3.1-20100528.163613-8.jar&lt;br/&gt;
magnolia-module-extended-templating-kit-1.3.1-20100528.164214-13.jar&lt;/p&gt;

&lt;p&gt;Let&apos;s hope we can switch back to stable versions again soon...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10040">
                    <name>causality</name>
                                            <outwardlinks description="caused by">
                                        <issuelink>
            <issuekey id="18503">MAGNOLIA-3213</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="13439" name="RssGenerator.zip" size="3857" author="ebunders" created="Wed, 26 May 2010 10:15:21 +0200"/>
                            <attachment id="13440" name="config.modules.rssaggregator.config.feedGenerators.tegenlicht-nieuws.xml" size="8164" author="ebunders" created="Wed, 26 May 2010 10:54:58 +0200"/>
                            <attachment id="13438" name="stacktrace.txt" size="7506" author="ebunders" created="Tue, 25 May 2010 17:19:49 +0200"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>vpro.nl</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 26 May 2010 17:19:38 +0200</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>mmuehlebach</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 38 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ebunders</customfieldvalue>
            <customfieldvalue>had</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0201b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11720</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>