Facebook 

SMFHacks.com - Celebrating 20 Years!

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4341
Latest: jmac32here
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 44306
Total Topics: 7676
Most Online Today: 365
Most Online Ever: 27044
(May 30, 2026, 09:10:16 pm)
Users Online
Members: 0
Guests: 216
Total: 216

Author Topic: Item count on Gallery Tab shows double  (Read 7424 times)

0 Members and 1 Guest are viewing this topic.

Item count on Gallery Tab shows double
« on: »
If a member adds one photo the Tab shows Two etc., any advice appreciated.
I'm using the latest version.

Re: Item count on Gallery Tab shows double
« Reply #1 on: »
Can you take a screenshot?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Item count on Gallery Tab shows double
« Reply #2 on: »
Sure, I added this pic but it does the same if a regular member posts one.

Re: Item count on Gallery Tab shows double
« Reply #3 on: »
What happens when you click unviewed? In the gallery how many photos does it show

Also what SMF version?
« Last Edit: September 24, 2024, 11:40:37 pm by SMFHacks »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Item count on Gallery Tab shows double
« Reply #4 on: »
Three pics were added to Gallery overnight, six showing on tab. After selecting 'Unviewed' there are three pics but still showing six on tab.
SMF version 2.1.4

Re: Item count on Gallery Tab shows double
« Reply #5 on: »
Copy this file to your sources folder and see if it helps
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Item count on Gallery Tab shows double
« Reply #6 on: »
Unfortunatly it is still the same with the updated file.
I uploaded a pic as a regular user (Tonyvic) it shows (2) on the tab. Not sure if it's correct but shows as new to me (Leavic) as well.

Re: Item count on Gallery Tab shows double
« Reply #7 on: »
Try running this sql query on your database replace #### with your member id for Leavic I am assuming admin user

Code: [Select]
SELECT
*
FROM smf_gallery_pic as p
LEFT JOIN smf_members AS m ON (p.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN smf_gallery_catperm AS c ON (c.ID_GROUP IN (1) AND c.ID_CAT = p.ID_CAT)
LEFT JOIN smf_gallery_log_mark_view AS v ON (p.ID_PICTURE = v.ID_PICTURE AND v.ID_MEMBER = #### AND v.user_id_cat = p.user_id_cat)
LEFT JOIN smf_gallery_usersettings AS s ON (s.ID_MEMBER = m.ID_MEMBER)
WHERE v.ID_PICTURE IS NULL AND ((p.USER_ID_CAT !=0 AND p.approved =1) OR (p.approved =1 AND p.USER_ID_CAT =0 AND (c.view IS NULL OR c.view =1))) GROUP by p.ID_PICTURE
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Item count on Gallery Tab shows double
« Reply #8 on: »
I will have to learn the query database again my ancient brain has forgotten, before I get to that I just noticed 138 errors from ADMIN (All the same in SMF log) and since I uploaded the updated file.
Leavic is me as a Regular User.



Re: Item count on Gallery Tab shows double
« Reply #9 on: »
hmm revert back try old file and see if errors are logged
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Item count on Gallery Tab shows double
« Reply #10 on: »
Errors now stopped, I will get on with the query suggested. Thanks.

Re: Item count on Gallery Tab shows double
« Reply #11 on: »
I run the query but unsure of what I should now do. :-[
I see nothing to say there is an error, but see the result in attached.

Re: Item count on Gallery Tab shows double
« Reply #12 on: »
It doesn't show the rows or anything else on the page?
It should have a list pictures in the database.
I want to see if the id's are unique or not.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Item count on Gallery Tab shows double
« Reply #13 on: »
Just got back to this, I am totally lost on the database & unsure what to do.
To recap, any user whatever group produce the double count.
Looking into this I wonder if I did the upgrade wrong, as in the Package Manager I see (attachment below) . I'm sure this issue only started after that so can I just uninstall 10.1.2 & check then do the upgrade again via the upgrade button?
« Last Edit: September 26, 2024, 12:55:43 pm by Tonyvic »

Re: Item count on Gallery Tab shows double
« Reply #14 on: »
The upgrade won't affect this.

I guess from the SQL screenshot would have liked to see the whole page hard to tell otherwise...
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
6160 Views
Last post January 15, 2008, 08:44:36 pm
by Matth41
5 Replies
10783 Views
Last post May 15, 2008, 09:53:58 pm
by SMFHacks
1 Replies
5303 Views
Last post May 24, 2009, 06:51:30 pm
by SMFHacks
3 Replies
6443 Views
Last post February 27, 2010, 03:56:42 pm
by Wegg
4 Replies
6415 Views
Last post February 06, 2015, 12:19:43 pm
by SMFHacks

+- Recent Topics

Registration - anti bot pattern matching by SMFHacks
November 01, 2026, 07:20:17 pm

EZPortal 8 by davejo
October 21, 2026, 01:01:54 pm

Downloads Pro 7.0 Released by SMFHacks
October 07, 2026, 07:35:30 pm

[Mod]ActivityPub Federation for SMF 2.1 by SMFHacks
October 01, 2026, 05:03:45 pm

Newsletter Pro 4.0 Released by SMFHacks
September 23, 2026, 08:08:24 pm

Can't remove or restore any item from the recycle bin by SMFHacks
September 22, 2026, 11:01:51 am

MCP Server for SMF 2.1 - let Claude, ChatGPT or Cursor run your admin chores by SMFHacks
September 12, 2026, 02:50:45 pm

Suggestions for improvements to Ultimate Shoutbox & Chatroom by davejo
September 02, 2026, 01:35:09 am

Automatic Sorting of Categories by Kiwi
August 31, 2026, 12:36:09 am

' appears as ' in Most Viewed (and Recent Items ?) by SMFHacks
August 22, 2026, 11:01:56 pm

Powered by EzPortal