Describe the bug
Calling the page with the suffix /content/site/page.html/suffix result in a wrong URL for model.json for that page that looks like /content/site/page.model.jsonsuffix
Looks like the line 291 should be
path += '/' + slingElementsWithoutResource.join('/');
Package version
1.4.0, but issue is present in the master too
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
Calling the page with the suffix /content/site/page.html/suffix should call for model.json with a proper URL which is /content/site/page.mode.json/suffix
Describe the bug Calling the page with the suffix
/content/site/page.html/suffix
result in a wrong URL for model.json for that page that looks like/content/site/page.model.jsonsuffix
Looking at the code it seems that the
PathUtil._replaceExtension
misses first/
See here: https://github.com/adobe/aem-spa-page-model-manager/blob/3b040b77f8afc07bfe9bc19d52ee00d76b8e22af/src/PathUtils.ts#L291Looks like the line 291 should be
path += '/' + slingElementsWithoutResource.join('/');
Package version 1.4.0, but issue is present in the master too
To Reproduce Steps to reproduce the behavior:
Expected behavior Calling the page with the suffix
/content/site/page.html/suffix
should call for model.json with a proper URL which is/content/site/page.mode.json/suffix
Screenshots N/A
Additional context N/A