Simon, true. I had another look at htaccess. There isn't any rewrite for images and there's no blocking of hotlinking of images, nothing except a www canonical rewrite.
Quote:
Originally Posted by kh99
I think Lynne was hinting at this before, but anyway - the cleanup2 scheduled task removes any entries from the attachment table that are older than 1 hour and have contentid = 0. So the fact that you saw the record had contentid=0 seems to be the problem...
That makes sense. It appears that the contentid shouldn't be equal to 0 and I don't know what's causing it to default to zero.
I've opened the class_dm_threadpost.php file and the code you posted is in there starting exactly at 526. I wouldn't know how to go about the debugging though and I hate to impose any further.
As I've stated before, I'm not alone and this is a problem that keeps coming up. Today I found the below explanation from this webmaster forum (reproduced here via the Creative Commons permission they have given on this page). The problem seems to be how images are attached. Using the WYSIWYG interface in vB is what seems to cause the problem and the advice is to avoid it.
Quote:
vB provides two methods for attaching a file to a post (through three different actions). Please be aware that one method works consistently, and the other has had ongoing problems (causing vB boards to purge attachments).
In brief, if you are adding an attachment to a post, click on the Go Advanced button shown under the Quick Reply post entry area. Do not use the Insert Image icon shown at the top of the Quick Reply area, also shown at the top of the post area when clicking on Edit Post.
If your attachment is a graphic and is displayed in your post as a graphic, you have added it correctly. If you have attached another files type, such as a spreadsheet or Zip file, the name of the file should be shown.
If your attachment appears as text, such as:
Attachment 403
you will need to edit your post. Any attachments displayed in a post with the word, attachment, followed by a number, have not been added to a post.
Attachments not used in a post are purged by vB after one hour; Your attachment must be displayed within your post to prevent vB from removing it.
This is all the information needed (if you are familiar with vB use). Greater detail is below.
The correct button to use when adding attachments in vB is below the post entry area (for both the Go Advanced entry screen and the Edit Post entry page), and is named Manage Attachments.
There are two ways to access this tool when making posts to vB. Clicking on 'Go Advanced' to make a post will enable access to the tool. After a post has been made, clicking on Edit Post will also give you access to the tool.
To add a file:
1. Click on Manage Attachments.
2. Click on +Add Files (in the upper right). A dialog allowing you to Select Files is shown.
3. Clicking on Select Files to show files on your computer.
3a. Clicking on Basic Uploader, then Browse, will also allow selection of a file from your computer.
4. Navigate to the directory holding the file you wish to attach
5. Click once to highlight and then click on Open (or double-click the file).
5a. This will show the file name in your Upload Files dialog.
6. Click on Upload Files to add the file to your File Upload manager under Attachments.
7. In the lower attachments area, the file should be accompanied by a tick in a box. If not, click on Insert Inline.
8. Click on Done to complete the process, and close the tool.
Your attachment will be placed wherever your cursor was placed (in your post) when you entered this Manage Attachments tool. (Position can be changed by moving the vB ATTACH code.)
(Please also be aware that this tool does not allow files to be stored for future use. Uploads not utilized within one hour will be deleted. Uploads that are not stored properly are also deleted within an hour.)
I add attachments all the time just using the image button in the Quick Editor and my attachments are still around.
As of Yesterday my members can no longer use the Image Button to add Images, I was previously doing it this way also. The Only way i can use the Quick Editor function is to then click on the Basic upload function..
This is Very Annoying , Is there a Quick Fix for this as i am getting asked by my Members OR is this a VB Gremlin that they are looking in to..
All Images remain once Added , They Never disappear
Please start your own thread since your issue isn't covered in this thread at all and it will only get confusing discussing two different issues in the same thread.
I have the same problem. I have a certain usergroup that can access a CMS page that has a link to an attachment. When I am logged in as administrator I can download the attachment just fine so I know the attachment is there. But when I log in as the other usergroup that can access the file I get the error "Invalid Attachment specified..."
I have verified the permission settings. Any help would be greatly appreciated. Thanks
EDIT: Ok, so I figured out my problem. I had added the attachment to a forum that my usergroup couldn't access and then used that URL for the attachment to the link on my CMS page. When I went in and posted the attachment in a thread my usergroup could access and then used that URL for the attachment, the link it worked just fine. As usual, user operated error Hope this helps anyone with a similar problem though.
Thank you for posting this. I was having the same issue and you helped me solve it!