1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Duplicate You do not have permission to view new attachment in preview

Discussion in 'Resolved Bug Reports' started by AndyB, Jun 30, 2013.

  1. AndyB

    AndyB Well-Known Member

    When I Upload a File (an image) and insert the image, I cannot preview the image. Steps to reproduce:

    1) Go to a thread
    2) In the quick reply, Upload a File (an image)
    3) Insert full image
    4) Click More Options...
    5) Click Preview...
    6) Click View attachment 50281

    The error is:

    You do not have permission to view this page or perform this action.
  2. Chris D

    Chris D XenForo Developer Staff Member

    @Mike may correct me if I'm wrong, but I believe this behaviour is to be expected.

    When you preview, it just runs the editor contents through the BB code parser, and renders that as a preview. Of course where it fails to be an accurate preview is a) it doesn't display the thumbnail (just the text) and b) this error.

    This error is to be expected because to view an attachment which has not yet been associated to an item of content you need to supply the temp hash parameter.

    The solution would be to do more than just parse the BB code in the editor. So, actually render the thumbnail, and/or actually append the temp_hash parameter to the URL so that the attachment will load. If the behaviour is as designed this is probably more of a suggestion.

    EDIT: Yep: http://xenforo.com/community/threads/attached-images-preview-permission.50518/#post-539936
    AndyB likes this.
  3. AndyB

    AndyB Well-Known Member

    Thank you, Chris. From the link you posted:

    Some members get really confused by this bug. I hope it's fixed in the future.
    Last edited: Jul 1, 2013
    Vincent likes this.

Share This Page