adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
726 stars 735 forks source link

Page properties "pageTitle" not working #2269

Open fahol-coop opened 1 year ago

fahol-coop commented 1 year ago

Bug Report

Current Behavior Page V3: "pageTitle" in the pageproperties is never used in html markup in field of the page .</p> <p><strong>Expected behavior/code</strong> pageTitle should be used in <title> field, if nothing is in pageTitle the fallback should be the jcr:title</p> <p>Description of the page from github Project: ./pageTitle - defines an alternative page title. Used for overriding the ./jcr:title in an on-page context. <a rel="noreferrer nofollow" target="_blank" href="https://github.com/adobe/aem-core-wcm-components/tree/main/content/src/content/jcr_root/apps/core/wcm/components/page/v3/page">https://github.com/adobe/aem-core-wcm-components/tree/main/content/src/content/jcr_root/apps/core/wcm/components/page/v3/page</a></p> <p>I'm not sure what the meaning of "on-page context" is. But I think it's the <title> tag on the page. </p> <p>Also the video from adobe itself on min 1:35, the guy says "pageTitle" should be taken first and jcr:title is the fallback. <a rel="noreferrer nofollow" target="_blank" href="https://experienceleague.adobe.com/docs/experience-manager-learn/sites/page-authoring/page-properties-feature-video-understand.html?lang=en">https://experienceleague.adobe.com/docs/experience-manager-learn/sites/page-authoring/page-properties-feature-video-understand.html?lang=en</a></p> <p>So I think this should be fixed or all videos and descriptions should be changed, what we can use the pageTitle for.</p> <p><strong>Environment</strong></p> <ul> <li>AEM 6.5.13</li> <li>Core Components 2.19.0</li> <li>JRE 11</li> </ul> <p><strong>Possible Solution</strong> I think it can be fixed here <a rel="noreferrer nofollow" target="_blank" href="https://github.com/adobe/aem-core-wcm-components/blob/main/content/src/content/jcr_root/apps/core/wcm/components/page/v3/page/head.html">https://github.com/adobe/aem-core-wcm-components/blob/main/content/src/content/jcr_root/apps/core/wcm/components/page/v3/page/head.html</a></p> <p>just add the pageTitle and the jcr:title as a fallback</p> <p><strong>Additional context / Screenshots</strong> <img referrerpolicy="no-referrer" src="https://user-images.githubusercontent.com/70140719/182866631-bbda5911-c7de-4fe1-bc09-fcdd70084dee.png" alt="image" /> <img referrerpolicy="no-referrer" src="https://user-images.githubusercontent.com/70140719/182866671-a487fb51-c581-4a9a-b519-f284407d1ce3.png" alt="image" /></p> <p><img referrerpolicy="no-referrer" src="https://user-images.githubusercontent.com/70140719/182866592-193720ff-a23e-40d4-a40a-ad8bad4397b0.png" alt="image" /></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/vladbailescu"><img src="https://avatars.githubusercontent.com/u/3670963?v=4" />vladbailescu</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>The title is initialized in the Sling model of the page: <a href="https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/PageImpl.java#L125-L129">https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/PageImpl.java#L125-L129</a></p> <p>@gabrielwalt tried to clarify how the titles are used in <a href="https://github.com/adobe/aem-core-wcm-components/issues/160">https://github.com/adobe/aem-core-wcm-components/issues/160</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/fahol-coop"><img src="https://avatars.githubusercontent.com/u/70140719?v=4" />fahol-coop</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Are there any news?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/Tylopilus"><img src="https://avatars.githubusercontent.com/u/45148577?v=4" />Tylopilus</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Bump: The <code>in-page-context</code> as far as I can tell is only used for other components that source their title from the page. These components are for example the title, teaser, list components. </p> <p>The title of the page and thus the meta-title in the HTML should also be updated. Leaving the <code>title</code> field in the end just a label for in aem editing.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>