danestves / danestves/strapi-plugin-preview-content

Admin URL assumed to be /admin which breaks clone button when using a custom admin URL

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
63
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I'm using custom admin URLs in production to [make it harder to find the admin panel without knowing the URL](https://docs-v3.strapi.io/developer-docs/latest/development/admin-customization.html#change-access-url). Doing so breaks the clone button on an entity's admin page (it's not an issue when clicking the icon on the collection type listing page.

I found the issue to be an hardcoded path in src/admin/main/preview-context/index.js

https://github.com/danestves/strapi-plugin-preview-content/blob/c0d5d2416452bd74a6837d097c85ee4492b89720/src/admin/main/preview-context/index.js#L290

The correct admin URL should be used instead. It could be retrieved via window.location.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.