0

I have a Legacy hybrid solution on SC 9.2 where only some page types are migrated to JSS.

The issue is that if I insert an Internal Sitecore Link to a media item, it returns 404.

Internal link works and the markup looks ok (in both legacy and JSS):

<a href="/relative-path-of-the-page">Test page</a>

But media items (imgs and pdf files) return 404 and the markup looks like below (in both legacy and JSS):

<a href="media_library_prefix/~/media/d494d2a8a8554dbf977695dbdd4e94b5.ashx">

The request for URL for media, in Legacy solution:

Request URL: http://myDomain/parentItem_path/media_library_prefix/~/media/d494d2a8a8554dbf977695dbdd4e94b5.ashx

and in JSS:

Request URL: http://myDomain/sitecore/api/layout/render/jss?sc_apikey={api_guid}&item=/parentItem_path/media_library_prefix/~/media/d494d2a8a8554dbf977695dbdd4e94b5.ashx&sc_lang=en

Any advices on what can I do to make Richtext to return the proper working URL ?

Thanks

1

1 Answer 1

1

The issue is that JSS needs the media library link to start with forward slash:

<a href="/media_library_prefix/~/media/d494d2a8a8554dbf977695dbdd4e94b5.ashx">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.