View Full Version : Images Disappearing
RichieBoy67
03-23-2017, 12:08 PM
Hello,
I am having this issue where images are posted/uploaded using the bbcode icon and then later they disappear.
Last night I posted a few test images and they were there showing for hours. I thought things were fine and then today I check and they are all links, no images..
I am serving from the file system. This was happening on another server and this week I moved to a new server hoping that the server may have been the issue..no such luck.
I have tried disabling plug ins and a few other things, nothing works. Not seeing anything of note in the logs either..
Thanks
--------------- Added 1490297979 at 1490297979 ---------------
Very strange.. The attachments are actually pulled from the database! What could do this?
I thought it was a plug in but I cannot find anything that would cause it... I doubt it is the server because I have 2 other vbulletin sites I am hosting on the same server..
Is anyone skilled enough to figure this out?
Lynne
03-23-2017, 06:57 PM
What version of vBulletin are you running? (And what version of PHP?)
RichieBoy67
03-23-2017, 07:00 PM
Hi Lynne,
Version 4.2.5 Beta 1
php 7.0.17
Issue was going on before using older versions as well but it is sort of random and I thought it was fixed for awhile. Nothing showing in the logs either.
--------------- Added 1490309940 at 1490309940 ---------------
Dave is helping me and we both are mystified..
I am doing a back up now and then I am going to change inline full size to thumbnails and see if that helps...
Not sure I know what else to try. I removed a boat load of plug ins, turned off cron tasks.. I thought maybe a cron task was doing it but I just do not know why.
Thoughts? What could remove those attachments right from the database like that? Recent images only..
--------------- Added 1490311408 at 1490311408 ---------------
seems to be a cron task..one of the clean up tasks..
--------------- Added 1490311861 at 1490311861 ---------------
I believe we found the culprit in cleanup2.php in the cron directory:
// Orphaned Attachments are removed after one hour
$attachdata = datamanager_init('Attachment', $vbulletin, ERRTYPE_SILENT, 'attachment');
$attachdata->set_condition("a.contentid = 0 AND a.dateline < " . (TIMENOW - 3600));
$attachdata->delete(true, false);
Lynne
03-24-2017, 02:15 AM
That should definitely be logged as a bug.
I was asking about the version and PHP version because there was a bug very much like this back in 4.2.3 (I believe). Sometimes bugs like to come back in every other version (not sure exactly why, but it does seem to happen).
RichieBoy67
03-24-2017, 02:18 AM
Yes, I recall that bug but I do not recall it using a cron task. I could be wrong though.. I do remember attachments being deleted though after upgrading and updating counters.
I will report this as a bug this week.
Thanks
##Big Thanks to Dave for helping me figure this out!
Lynne
03-24-2017, 05:05 PM
It was one of the cleanup cron jobs that was causing the other bug (iirc).
RichieBoy67
03-24-2017, 05:06 PM
It was one of the cleanup cron jobs that was causing the other bug (iirc).
Good to know. Thanks :up:
RichieBoy67
04-04-2017, 08:45 PM
I have still got an issue with image attachments. They post ok but apparently unregistered users cannot see some of the recently posted attachments.
I have gone through attachment permissions and all are set fine. Unregistered members should be able to download and view images..
Disabling plug ins does not fix this issue either.
##Upon visiting a post that just images uploaded I see nothing but file size and name. As soon as I log in I see the images and then if I log out the images still show..
Lynne
04-04-2017, 10:08 PM
The image still shows once you logout because it is cached in your browser.
But, do you allow users to view the site via www.site.com and also just site.com? If so, make sure your cookie domain is set correctly or that will cause users to not be able to see the images unless they are using the URL you specified in the admincp.
RichieBoy67
04-05-2017, 01:37 AM
The image still shows once you logout because it is cached in your browser.
But, do you allow users to view the site via www.site.com and also just site.com? If so, make sure your cookie domain is set correctly or that will cause users to not be able to see the images unless they are using the URL you specified in the admincp.
Hi Lynne, Thank you
I have all urls redirected to https:// and cookies set to default.
Kane@airrifle
04-05-2017, 09:43 AM
Also check your per forum permissions where usergroup settings can be overridden.
RichieBoy67
04-05-2017, 12:24 PM
Also check your per forum permissions where usergroup settings can be overridden.
Thanks, these are default as well and unregistered users are allowed to download attachments, see thumbnails, etc.. No change there.
--------------- Added 1491416478 at 1491416478 ---------------
Thought I fixed this because it does not seem constant. Some images go up no problem and others just do not show for guests. I just do not understand it.
Lynne
04-05-2017, 04:30 PM
The ones that don't show for guests.... do they show if you are logged in?
Can we get a link to an example post that shows an image for guests and a post that isn't showing the image for guests?
RichieBoy67
04-05-2017, 05:29 PM
The ones that don't show for guests.... do they show if you are logged in?
Can we get a link to an example post that shows an image for guests and a post that isn't showing the image for guests?
Yes, as soon as I log in I see the image.
Sure, I do not want to post the link publically though but I will pm it if ok with you.
--------------- Added 05 Apr 2017 at 16:47 ---------------
A couple other clues..
It is not just unregistered users that cannot see the images. It is other usergroups as well..
I post the images as admin and can only see them using admin..
If the attachment manager is used there are no problems at all..
PS - This was working before I did the 4.2.5 Beta 4
--------------- Added 05 Apr 2017 at 17:06 ---------------
Using debug:
guest:
REPLACE INTO postparsed (postid, dateline, hasimages, pagetext_html, styleid, languageid) VALUES (3201450, 1491425387, 0, 'Nice in this topic.https://vborg.vbsupport.ru/external/2017/04/1.orghttps://vborg.vbsupport.ru/external/2017/04/1.orghttps://vborg.vbsupport.ru/external/2017/04/1.org', 39, 1),(3208226, 1491425387, 2, 'Test
\n13581', 39, 1)
admin
REPLACE INTO postparsed (postid, dateline, hasimages, pagetext_html, styleid, languageid) VALUES (3201450, 1491425387, 0, 'Nice in this topic.https://musclemecca.com/%22http://musclemecca.com/images/smilies/present.gif/%22https://musclemecca.com/%22http://musclemecca.com/images/smilies/courage.png/%22https://musclemecca.com/%22http://musclemecca.com/images/smilies/hello.gif/%22', 39, 1),(3208226, 1491425387, 2, 'Test
\n13581', 39, 1)
RichieBoy67
04-06-2017, 12:04 AM
Dave tracked it down to patches/vbforum/attach/post.php:
if ($this->attachmentinfo['contentid'] == 0)
{
if ($this->registry->userinfo['userid'] != $this->attachmentinfo['userid'] AND !can_moderate($postinfo['forumid'], 'caneditposts'))
{
return false;
}
}
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.