활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hey guys,
We are using AEM with React and having trouble with SPA Routing. We are facing an intermittent issue when the Link contains # or ?
Page data is available using .model.json on the page URI but sometimes when we have # and ?, model.json is added after full URL rather than just path and hence it fails.
And it happens when on dispatcher only when we dont have .html in the URL.
E.g:
Lets say a React Link points to /en/mypage?cid=campaign
I expect data call for this to be /en/mypage.model.json but sometimes it is sent as /en/mypage?cid=campaign.model.json
This logic is abstracted in the node module and hence difficult to check. Anyone else faced similar issue?
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
We've prepared patch to fix it: https://github.com/adobe/aem-spa-page-model-manager/pull/54
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
It is happening while routing from one page to another.. cq:pagemodel_root_url always has root page URL and not current page URL. And we are not using custom code to load page model json. Its just a Link tag with a URL and that automatically calls model.json internally
<Link to={myurl}>
Label
</Link>
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
We are doing like similar to https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-spa-wknd-tutorial-develop/...... Does it really matter how we populate the URL.. It is just a JSX variable and it is populated on what author puts in the component. When I say automatically, I mean whenever we pass a URL to React Link, AEM automatically makes a call to model.json of the link specified in to attribute.
There isnt anything in componentDidMount.. We just get props in mapped JS for the components and thats what we are using in React Link
조회 수
답글
좋아요 수
@viveksachdeva
Try playing around with the dipatcher re-write rules if it helps.
We guys also implemented similar thing but didn't faced such issue.
조회 수
답글
좋아요 수
We also have the same issue appearing, right after we started to rewrite URLs removing `.html` bit in a page path.
Looks to me that URL parsing code in the routing library contains a bug for the case of absent page extension and should be fixed.
조회 수
답글
좋아요 수
We've prepared patch to fix it: https://github.com/adobe/aem-spa-page-model-manager/pull/54
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수