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

Images that aren't published aren't showing on shared draft #132

Closed
2 of 4 tasks
mxmclaudel opened this issue Feb 10, 2021 · 7 comments
Closed
2 of 4 tasks

Images that aren't published aren't showing on shared draft #132

mxmclaudel opened this issue Feb 10, 2021 · 7 comments

Comments

@mxmclaudel
Copy link

mxmclaudel commented Feb 10, 2021

When a page is saved (unpublished) and it contains images that also haven't yet been published (new content or updated version), previewing the page shows all the images correctly. However when using the Share draft generated link, the updated text shows but images don't. The src link is using the draft one (e.g. /assets/6d1c8a031e/test-image__ResizedImageWzYwMCw5MDZd.jpg).

Only images that are published will show, which reduces the usefulness of sharing a draft.

This is SilverStripe 4.7

ACs

  • Draft files are visible in a shared draft link
  • Files with a view permission applied cannot be accessed in the shared draft link

PRs

@michalkleiner
Copy link
Contributor

@mxmclaudel how are you including the images (that don't show in the preview) in the page? Are they referenced via shortcodes in WYSIWYG editors or structured data via e.g. a has_one relation sort of thing? Reproduction steps or a bit more description might help narrow down what the problem might be.

@mxmclaudel
Copy link
Author

@michalkleiner oh yes, apologies.

  • Create a new page.
  • in the Content (default WYSIWYG editor), add some text.
  • Click Insert image from files
  • Click Upload and select a local file
  • Click Insert File
  • The editor displays the image.
  • Save the page (not publish)
  • Click Share
  • Copy/Paste the link into a new tab. The content and images show.
  • Paste the same link in a different browser (or incognito mode). The content shows, the images don't.
  • In the CMS/Files; browse to the image, click Publish
  • The preview link now shows the images in all browsers regardless of whether the user is logged in the CMS or not.

Also note that publishing the page automatically publishes the related images.
Files/images linked via $has_one and $owns are displaying fine in the shared draft.

@amolswnz
Copy link

Another issue

  • Create Share page link with draft images
  • Open sharedraft link while the current user is logged in
  • Draft Images are shown
  • Logout and login again
  • Refresh page
  • Draft images are not shown

@andrewandante
Copy link

Hi team, any movement on this one? I see that the two PRs appear to appear to be approved and updated?

@emteknetnz
Copy link
Member

emteknetnz commented Mar 2, 2022

Sharedraftcontent PR needs approval/merge by someone with merge access. Ideally they'd also merge the already approved assets PR at the same time so I don't have to self merge it.

@michalkleiner
Copy link
Contributor

Assets PR merged, sharedraftcontent ready for an update in terms of the travis config there and merge once tests pass.

@emteknetnz
Copy link
Member

Linked PRs have been merged

@andrewandante let me know if you have any further issues with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants