Rare Temporary Error - Uploaded image does not appear

chrisj

Active member
I uploaded an image twice and got the same error. I then tried uploading in different threads and everything working again. I thought it was an odd permissions error at first but I looked at the database.

xf_attachment:
content_type blank
content_id 0
temp_hash: long string
unassociated: 1

xf_attachment_data is correct.

The two uploads can be viewed from the admin attachment browser.

It may be a very rare error since my forum has over 3k attachments and this is the only time this has ever happened (unless the forum prunes unassociated attachments).
 
The forum does prune unassociated attachments. That runs as part of the Daily Clean Up Cron.

What was the error you got? Is it in the Server Error Log?

That record in the xf_attachment database is what you'd expect to see if you uploaded an attachment and then never submitted the post. The content_type and content_id are set and the temp_hash is cleared and the unassociated is set to 0 at the time of posting the reply. So that record in the database doesn't indicate in itself that there's been a problem.

But yeah, the actual error message would be useful if you still remember it. And when did the error occur? When the image was uploaded? Or when the post was submitted?
 
Yeah... need the error message. Need more details.

The forum does prune unassociated attachments. That runs as part of the Daily Clean Up Cron.

It's in the hourly cleanup, not daily. And when it runs it only deletes unassociated attachments that are at least one hour old. So if you upload an attachment and let it sit for at least an hour without submitting the post then it can be deleted. Once the post is submitted then it becomes associated and will not be deleted.

Moving to troubleshooting until we can get more information about the problem.
 
Just had this issue again. I uploaded an image, added it to the post as a thumbnail, and saved the image. What showed up was a link that said, click to view attachment. When I clicked it, I got "You do not have permission to view this page or perform this action."

I have never had users complain about this. I don't upload images that often so it may not be as rare as I had assumed.

These are my installed add-ons:
Screen Shot 2013-06-07 at 11.18.07 PM.webp
 
@Jake Bunce I was able to reproduce the error. I tested it with several posts and every single attachment had the same issue. The image shows up in the text editor fine but when I click "Post Reply" the image changes to a "View Attachment 54XX". I created a new tab and loaded the same thread and I was able to attach fine. I then went back to the old tab and I had the same prior issue. Would looking at the source code from both tabs help? If so I will send you them. I still don't know how to recreate this. My gut feeling is it has to do with the token being revoked but I know little about that system.
 
Link to site please :)

You've not given an error message to go by and so this is impossible to diagnose simply by you telling people what the error is.... ie... This is something someone would need to visit your site for and take a deeper look into it.

Uploading attachments works on everyone else's site, including mine, which has well over 80 add-ons currently installed.

So I or someone else would need to check it out first hand. :)
 
Last edited:
@Adam Howard
The site is psvitaforum.com
The uploading process definitely works, the problem is occurring during the post reply action where I guess Xenforo tries to associate it with the post.

It displays properly in the text editor as a thumbnail or full size image but when I press Post Reply, the image changes to a link "View attachment 5436" which links to /attachments/5436

That url displays the error:
PS Vita Forum - Error
You do not have permission to view this page or perform this action.

There is no error in the server error log. Should I turn debug mode on?
 
@Adam Howard
The site is psvitaforum.com
The uploading process definitely works, the problem is occurring during the post reply action where I guess Xenforo tries to associate it with the post.

It displays properly in the text editor as a thumbnail or full size image but when I press Post Reply, the image changes to a link "View attachment 5436" which links to /attachments/5436

That url displays the error:


There is no error in the server error log. Should I turn debug mode on?
http://psvitaforum.com/threads/upload-test.13797/

Worked for me. :)

I assume you fixed it. Sorry it took so long to get back to you. I didn't get notified about your reply. :(
 
http://psvitaforum.com/threads/upload-test.13797/

Worked for me. :)

I assume you fixed it. Sorry it took so long to get back to you. I didn't get notified about your reply. :(
It doesn't happen all the time. I think it is somewhat rare. I've never had a user complain about it but I have experienced it a few times. My guess is it is an issue with the token being revoked and possibly an effect of having multiple tabs of my forum open.
 
It doesn't happen all the time. I think it is somewhat rare. I've never had a user complain about it but I have experienced it a few times. My guess is it is an issue with the token being revoked and possibly an effect of having multiple tabs of my forum open.

The only time I ever saw the links was in preview. This is normal.

Capture.webp

I was trying to get the error to reproduce and got this....

...... Guess your staff is wondering why I'm posting photos :ROFLMAO:......

(see attach. click to enlarge)
 

Attachments

  • Capture2.webp
    Capture2.webp
    70.1 KB · Views: 4
Last edited:
Top Bottom