next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

Get getResourceByPath for Drupal Media

Open theodorosploumis opened this issue 3 years ago • 1 comments

I am trying to display a normal NextJS page to display single Drupal Media under path /media/[mid].tsx.

I am trying to get the entity using const entity = await getResourceByPath(/media/${mid}); but I always get a 404 error.

The issue is solved only if I enable the option [x] Allow users to access media items at /media/{id} under Media Settings on the Drupal CMS (/admin/config/media/media-settings).

If the above is true we need to update the Documentation accordingly.

theodorosploumis avatar Apr 18 '22 14:04 theodorosploumis

I see. I think we could document the permissions required for the entity types shipped in core.

shadcn avatar Apr 21 '22 16:04 shadcn