XF 2.0 [View attachments to posts] Forum Permission not working for [Unregistered / Unconfirmed] group

Mr. Wah

Member
Hello,

I'm currently rocking XF 2.0.10 and noticed this issue at least all the way back in XF 2.0.7, and did not have this issue when I was using XF 1.5.

My [Unregistered / Unconfirmed] (guest) user group has the permission to [Forum Permissions: View attachments to posts]. However, guests are not allowed to view attachments unless they're logged in, defeating the purpose.

So in my feature posts or announcements where I use image attachments, the article looks empty.
Could the functionality be restored from the 1.x days where setting this group to being able to view attachments will let them view attachments again?

To see an example of this:

There's a section of the article where attachments are linked, and not being logged in just shows blank:
@axouel2009 has done a great job delivering a unique art piece for each currently revealed character coming to Dead or Alive 6. Be sure to catch up on everything he has to offer in the art section of the forum. His most recent drawing is Mila from the 'Team Muscle' reveal last month.

art_mila_axel_576x324-jpg.26402



art_bayman_axel_576x324-jpg.26403


@Battlecat396 consistently delivers new contributions to the art section with a colorful cartoon style. His art usually taps into the funny and adventurous portions of DOAs story as new things from DOA6s story mode are shown. This artist expresses that Mila could defeat Bass in the story to progress her character development as an up and coming superstar.

26406


Site News
Thank you
 
The code being displayed on your site indicates that the system thinks that the full size attachments can be displayed. If they couldn't, you would see the thumbnail versions instead.

This is very likely pointing to an add-on interfering. You should do the standard troubleshooting steps of confirming with all add-ons disabled on a default style.
 
This is very likely pointing to an add-on interfering. You should do the standard troubleshooting steps of confirming with all add-ons disabled on a default style.

Yes, I did that before I made this thread to make sure I was reporting a bug with XenForo or was an issue with an add-on. Disabling all of my add-ons and using the default style still produces the issue.

I also researched before creating this thread, where others are expressing similar issues.

My current theory is that guests are being denied viewing attachments that they are being linked to if the attachment was attached in a board they don't have access to. As I've been able to verify that they are able to see attachments that were attached in a board they do have access to.

This causes issues for me as I use a private "News" board to make drafts and have editor-style approval before releasing News.
 
Last edited:
It works fine in my testing.

Guests can view attachments in this forum: http://b92c8bfe7b8eaf39.demo-xenforo.com/2010/index.php?threads/test.1/

Guests can not view attachments in this forum: http://b92c8bfe7b8eaf39.demo-xenforo.com/2010/index.php?threads/test-2.2/

Achieved via the View attachments to posts permission.

XF 2.0.10

Thank you for testing this, but I am able to see what looks like some sort of thumbnail of the attachment as a guest? Is this correct?

Can you test with my only steps that I've been able to reproduce:
  1. Create post in board/node Guests can't access.
  2. Add and insert image attachment to post.
  3. Create post in board/node Guests can access.
  4. Link to image attachment from Step 2 using IMG tags in post on step 3.
 
I am able to see what looks like some sort of thumbnail of the attachment as a guest? Is this correct?
That is correct.

Link to image attachment from Step 2 using IMG tags in post on step 3.
IMG tags are for embedding, not attachments.
Just click the insert as full option for attachments.

However, regardless of which method used, if guests can view attachments, then they should see the image.
 
Just click the insert as full option for attachments.

Unfortunately, you can't "Insert as full option" an attachment uploaded into another thread. And requesting to duplicate attachment uploads for every post or comment that wants to show the attachment c/would fill data space faster.

This wasn't an issue in my XF 1.5 versions, and only have issues with attachments uploaded and linked this way in XF 2.0.

However, regardless of which method used, if guests can view attachments, then they should see the image.

Right. They should, but they aren't. When they go to the url for the attachment uploaded to a post in a thread they cannot visit, they are prompted to log in or register.
 
If you are linking to attachments from another forum then the permissions for guests must be set in that forum - where the original attachment is.

I suspect that is your problem.
 
If you are linking to attachments from another forum then the permissions for guests must be set in that forum - where the original attachment is.

I suspect that is your problem.

If you're saying that's a feature, I would like to just say I disagree with that and would request that the link to view an attachment shouldn't be overridden by the node view permission. I would expect it to be the opposite priority where you can't see the node, but if given the direct url to the attachment you can see it as a guest. However, I also would request that at the very least a toggle be made to allow the forum admin to opt in to this desired priority.
 
Last edited:
Couldn't this be solved by simply giving guests the ability to view attachments in that hidden area? They still can't get to it to view the other content since they don't have permissions to access that area (I assume).
 
Couldn't this be solved by simply giving guests the ability to view attachments in that hidden area? They still can't get to it to view the other content since they don't have permissions to access that area (I assume).

While this would be a nice workaround that I didn't consider before. In practice, setting the node permission as you suggest does not allow them to view the attachment still, presumably because of the permission to view the node itself is overriding the attachment permission.
 
Back
Top Bottom