Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
URLs for siteMenuItems links are incorrect in the Page Model API response. In live (non-preview) API the URL includes the hostname and port, which makes it not possible to use these URLs for creating xhr links in an SPA. For example:
hstLink: {
path: "",
url: "http://127.0.0.1:9080/site/spa-hap/resourceapi"
}
Strangely enough, the hostname and port are omitted in the preview version (_cmsinternal) of the API. For example:
hstLink: { path: "news", url: "/site/_cmsinternal/spa-hap/resourceapi/news" }
Additionally, the URL contains 'resourceapi'. The menu-items should not link to the API but to the site. They should use the parent site mount, similar to the content links of the API.
Finally, there is also no meta-data included on whether the link is internal or external to determine if the link could be an xhr link or page load. See also HSTTWO-4274.