<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AEM links not mapped when page does not exist in Adobe Experience Manager Discussions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-links-not-mapped-when-page-does-not-exist/m-p/449082#M33419</link>
    <description>&lt;P&gt;Could you please let me know what exactly did you check? It seems that this problem is related to `.html` extension in the mapped link. Behaviour I noticed:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When component renders link with `.html` extension it is always mapped&lt;/LI&gt;&lt;LI&gt;When component renders link without .html extension the link is mapped only when link page actually exists&lt;UL&gt;&lt;LI&gt;link to existing page is mapped&lt;/LI&gt;&lt;LI&gt;link to not existing page is not mapped&lt;/LI&gt;&lt;LI&gt;This can be tested with Core Components Text component (I removed .html manually from CRX for the purpose of the test)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Thu, 21 Apr 2022 08:55:42 GMT</pubDate>
    <dc:creator>bartek_887</dc:creator>
    <dc:date>2022-04-21T08:55:42Z</dc:date>
    <item>
      <title>AEM links not mapped when page does not exist</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-links-not-mapped-when-page-does-not-exist/m-p/444481#M33417</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with AEM links rewriting. I have a set of mappings that works correctly for my site. All links in content are mapped nad works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem happened when my component (for example core components RTE) links to a page that is not published. In that case link is not mapped and I can see in cached HTML file that the link is `/content/my-site./en/not-existing` isntead of `/en/not-existing`. When I publish `not-existign` page and clear cache link is correctly mapped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is that a new feature of AEM / Sling mappings? Can I change that ? I would like to avoid having unmapped links even if they points to 404 page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AEM 6.5.9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link checker transformer config:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;jcr&lt;/SPAN&gt;&lt;SPAN&gt;:root &lt;/SPAN&gt;&lt;SPAN&gt;xmlns:&lt;/SPAN&gt;&lt;SPAN&gt;sling&lt;/SPAN&gt;&lt;SPAN&gt;="http://sling.apache.org/jcr/sling/1.0" &lt;/SPAN&gt;&lt;SPAN&gt;xmlns:&lt;/SPAN&gt;&lt;SPAN&gt;jcr&lt;/SPAN&gt;&lt;SPAN&gt;="http://www.jcp.org/jcr/1.0"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;jcr&lt;/SPAN&gt;&lt;SPAN&gt;:primaryType&lt;/SPAN&gt;&lt;SPAN&gt;="sling:OsgiConfig"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;linkcheckertransformer.strictExtensionCheck&lt;/SPAN&gt;&lt;SPAN&gt;="false"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;linkcheckertransformer.rewriteElements&lt;/SPAN&gt;&lt;SPAN&gt;="[a:href,area:href,form:action,img:src,link:href,script:src]"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;linkcheckertransformer.stripExtensionPathBlacklist&lt;/SPAN&gt;&lt;SPAN&gt;="[]"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;linkcheckertransformer.disableRewriting&lt;/SPAN&gt;&lt;SPAN&gt;="false"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;linkcheckertransformer.disableChecking&lt;/SPAN&gt;&lt;SPAN&gt;="true"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;linkcheckertransformer.stripHtmltExtension&lt;/SPAN&gt;&lt;SPAN&gt;="true"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;linkcheckertransformer.mapCacheSize&lt;/SPAN&gt;&lt;SPAN&gt;="5000"&lt;/SPAN&gt;&lt;SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 12:02:05 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-links-not-mapped-when-page-does-not-exist/m-p/444481#M33417</guid>
      <dc:creator>bartek_887</dc:creator>
      <dc:date>2022-03-15T12:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: AEM links not mapped when page does not exist</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-links-not-mapped-when-page-does-not-exist/m-p/444530#M33418</link>
      <description>&lt;P&gt;Hi &lt;LI-USER uid="17468940"&gt;&lt;/LI-USER&gt;, I did quick check on my local AEM instance. I was able to configure sling mappings in the way, that all the links including the one that are pointing to not existing pages are correctly mapped/rewritten. I have used OOTB we-retail for that exercise.&lt;/P&gt;&lt;P&gt;Below is the mapping configuration I have tested. I have also used exactly the same &lt;EM&gt;Day CQ Link Checker Transformer&lt;/EM&gt; to the one you have provided in your message.&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="sling:Mapping"
    sling:internalRedirect="[/content/we-retail/us/en]"&amp;gt;
    &amp;lt;redirect
	jcr:primaryType="sling:Mapping"
    	sling:internalRedirect="[/content/we-retail/us/en/$1,/$1]"
    	sling:match="(.+)$"/&amp;gt;
&amp;lt;/jcr:root&amp;gt;&lt;/PRE&gt;&lt;P&gt;Alternatively you can consider to enable checking functionality of &lt;EM&gt;Link Checker&lt;/EM&gt;, in that case broken/not existing links will not be shown at all. To do this you need to change &lt;EM&gt;linkcheckertransformer.disableChecking&lt;/EM&gt; to false.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 15:11:18 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-links-not-mapped-when-page-does-not-exist/m-p/444530#M33418</guid>
      <dc:creator>lukasz-m</dc:creator>
      <dc:date>2022-03-15T15:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: AEM links not mapped when page does not exist</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-links-not-mapped-when-page-does-not-exist/m-p/449082#M33419</link>
      <description>&lt;P&gt;Could you please let me know what exactly did you check? It seems that this problem is related to `.html` extension in the mapped link. Behaviour I noticed:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When component renders link with `.html` extension it is always mapped&lt;/LI&gt;&lt;LI&gt;When component renders link without .html extension the link is mapped only when link page actually exists&lt;UL&gt;&lt;LI&gt;link to existing page is mapped&lt;/LI&gt;&lt;LI&gt;link to not existing page is not mapped&lt;/LI&gt;&lt;LI&gt;This can be tested with Core Components Text component (I removed .html manually from CRX for the purpose of the test)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 21 Apr 2022 08:55:42 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-links-not-mapped-when-page-does-not-exist/m-p/449082#M33419</guid>
      <dc:creator>bartek_887</dc:creator>
      <dc:date>2022-04-21T08:55:42Z</dc:date>
    </item>
  </channel>
</rss>

