Bug Duplicate images created from Posts

Status
Not open for further replies.

Rick

Customer
We are being flooded with 2, 3, 4 or more image sets from posts. In order to populate
our gallery with new pictures. We have pre-checked the "Add post images to gallery"
checkbox in the New Post page. However, we are seeing cases where a user may have
posted 5 pictures for example and the upload category will display 2, 3, or 4 or more
copies of each picture. The picture filenames may be the same but the imageid is unique to
every one of them. These don't seem to come from anywhere except the original post.

We really need to get this fixed. Please let me know what I can do to help!
Regards,
Rick
 
Hi Rick,
Could I get temporary admin access to your site? I've tried to replicate this locally and I can't. Also an example thread that created multiple instances would help as well.

For security reasons, we recommend you create a new AdminCP account only for DBTech support, then disable or delete it after we have both confirmed the issue has been solved and there are no further issues. It should ideally be a temporary account created for us only. If we have created an account on your site already, you can optionally boost that account to Administrator and then de-admin this account once the issue has been solved.

If you use a .htaccess password protection for your AdminCP directory, it is recommended that you create a new authorised user for DBTech and remove this user once the issue has been solved.

Please test any temporary accounts you create to ensure that the AdminCP account can access the administrative controls for the product we are assisting you with.

Ensuring this is all in order before submitting the information will significantly speed up the process of assisting you. We will alert you via PM if there's any issues with the login information you have provided.

When sending the PM, for your security you should also un-tick the "Save a copy in my Sent Items folder" checkbox. When the access details have been received, we will delete the PM from our inbox. Ensuring you have not kept a copy of the PM reduces the risk of security breaches.

Thank you for helping us debug our products and allowing us to assist you, we appreciate it
 
Followup: I have determined the source of the problem. While tracking it down, I found something very interesting. If you use the attachment manager and it inserts the images "inline", it does not get imported to the gallery. Now, when you use the advanced editor "Insert Image" icon, it uses the ATTACH=CONFIG]171958[/ATTACH method. Apparently, these are the only images that get imported on newpost. What I found was the if you press the "Preview Post" button, the newpost_process.php plugin is called and it also will import the pictures. The bug appears to be this behavior. Each time Preview is pressed, a set of images is added to dbtech_gallery_images, as well as when you hit Save. I suspect that only the save operation should import the images.

Regards,
Rick
 
Last edited:
Hmmm, one more slight problem. My upload category is 33. However, in the hook/plugin, I am detecting the
forum which created the attachment and then setting the catid to the correct one. It works fine if I am
admin, but not if I am a regular user. Is there something checking to see who owns the categories? admin in
this case. Everyone has permissions to upload...

Thank you!

ps. It seems that if I am not the admin (1) user, the plugin looks for the attachment with the
userid such as ~/vBattach/5/4/6/5/6/161475.attach but when I do a find in the vBattach
directory, I find it here: ~/vBattach/1/161475.attach, so of course it is not found and thus not
imported to the gallery. Any idea why I am seeing that behavior? I do know the attachmentid
is not the filedataid, which is what is shown in the paths above.

[UPDATE] This problem seems to have been caused by browser cookies. I cleared them,
relogged in as a registered user and it works fine now.

Thank you!

One last question. I noticed that you need to be in the advanced editor for an image
to be imported. If you are in the "quick reply" editor, (and the attach post image flag is prechecked
in the advanced options), the images do not get imported. Is there a way to fix this?
Thank you!
Rick
 
Last edited:
Did the cookie cause both of the first two problems?

It was only designed to work on the first post, it wasn't designed to work on people replying. I'll check into adding it on there.
 
Yes, Post #7 was caused by the cookie problem. It is all working fine now including setting the category
from the forumid. So now I am back on to why the attachment manager loaded images do not show up.
I see that those images are actually in their own div that looks like a set of these:
<!-- BEGIN TEMPLATE: postbit_attachmentthumbnail -->
<a href="attachment.php?attachmentid=172119&d=1411398495"
rel="Lightbox_1880189" id="attachment172119"
><img class="thumbnail" src="attachment.php?attachmentid=172119&stc=1&thumb=1&d=1411398495"
alt="Click image for larger version. 
Name: number1.jpg 
Views: 0 
Size: 265.2 KB 
ID: 172119"/></a>
 
<!-- END TEMPLATE: postbit_attachmentthumbnail -->
I suppose I can try to parse the attachmentid out of it...

also: removing $dbtg_addimg from the if statement will give you the replies.
 
Status
Not open for further replies.

Legacy DragonByte Gallery

vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
865
Customer rating
0.00 star(s) 0 ratings
Top