adobe / adobe/aem-project-archetype

Duplicated API call for model.json on short URL pages - call for /.model.json

Open
#811 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
596
Forks
431
Avg merge
10d 6h
Merged PRs (30d)
1

Description

I have experienced additional API call in network tab for /.model.json for page which use short url like https://foo/bar/ - this call is not present for https://foo/bar.html

Expected Behaviour : For https://foo/bar/ model json call should be https://foo/bar.model.json

Actual Behaviour: For https://foo/bar/ model json call is duplicated https://foo/bar.model.json and https://foo/.model.json

On some servers where /. calls are blocked this behavior is breaking page loading - as /.model.json is rejected - and application doesn't get JSON as this second /.model.json overwriting first proper call /bar.model.json
![duplicate](https://user-images.githubusercontent.com/16478872/134471449-f5c5676c-efe3-4560-af26-59645f59d133.PNG)

Contributor guide

Open the contributing guide

Research direction

Reproduce the network requests for a short URL such as /bar/ and compare them with /bar.html, especially the calls to /bar.model.json and /.model.json. Trace the code path that builds the model JSON URL; done means the short URL makes only the correct /bar.model.json request and page loading still works when /.model.json is blocked.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.