Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] - If page is called with suffix (e.g. /page.html/suffix) it result in wrong URL for model.json #94

Open
marcinczeczko opened this issue Feb 14, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@marcinczeczko
Copy link

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:

path += slingElementsWithoutResource.join('/');

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. 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

Screenshots
N/A

Additional context
N/A

@marcinczeczko marcinczeczko added the bug Something isn't working label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant