Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected preview path for images outside of media_library #3241

Closed
erquhart opened this issue Feb 12, 2020 · 0 comments · Fixed by #3252
Closed

Unexpected preview path for images outside of media_library #3241

erquhart opened this issue Feb 12, 2020 · 0 comments · Fixed by #3252

Comments

@erquhart
Copy link
Contributor

Describe the bug

See #3240 for context. That issue is the final fix for this, this issue is toward graceful failure.

  • If a collection of markdown documents have images from multiple directories in their document body, the CMS can only properly handle one of those directories.
  • Images from outside that directory are shown in the CMS with src set to the media_folder, except in the case of an absolute media_folder, the opening slash is removed, resulting in a relative path.

Example scenario:

  • combined media_folder for collection:
    /static/Images/docbook/images/api_mgmt
  • markdown image tag:
    ![API Gateway features](/Images/docbook/images/concepts/api_server.png)
  • resulting HTML img tag src in the CMS editor:
    static/Images/docbook/images/api_mgmt/api_server.png

To Reproduce

An entry in a deploy preview for a site implementing Open Authoring shows this behavior:
https://deploy-preview-203--axway-open-docs.netlify.com/admin/#/collections/apimgr_concepts/entries/apigtw_introduction

The Axway open docs site can be forked and run locally for testing:
https://github.com/Axway/axway-open-docs

Expected behavior

  • resulting HTML img tag src in the CMS editor should fall back to the URL provided in the content:
    /Images/docbook/images/concepts/api_server.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants