Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4268
Latest: Butiks
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 43583
Total Topics: 7566
Most Online Today: 71
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 37
Total: 37

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

0 Members and 1 Guest are viewing this topic.

Offline Tonyvic

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 35
    • View Profile
Item count on Gallery Tab shows double
« on: September 24, 2024, 01:31:06 pm »
If a member adds one photo the Tab shows Two etc., any advice appreciated.
I'm using the latest version.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16580
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #1 on: September 24, 2024, 01:33:03 pm »
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/

Offline Tonyvic

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 35
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #2 on: September 24, 2024, 04:41:49 pm »
Sure, I added this pic but it does the same if a regular member posts one.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16580
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #3 on: September 24, 2024, 04:48:26 pm »
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/

Offline Tonyvic

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 35
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #4 on: September 25, 2024, 03:53:29 am »
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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16580
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #5 on: September 25, 2024, 07:50:19 am »
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/

Offline Tonyvic

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 35
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #6 on: September 25, 2024, 09:52:43 am »
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.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16580
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #7 on: September 25, 2024, 09:58:55 am »
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/

Offline Tonyvic

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 35
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #8 on: September 25, 2024, 10:08:23 am »
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.



Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16580
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #9 on: September 25, 2024, 10:30:59 am »
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/

Offline Tonyvic

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 35
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #10 on: September 25, 2024, 12:25:29 pm »
Errors now stopped, I will get on with the query suggested. Thanks.

Offline Tonyvic

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 35
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #11 on: September 25, 2024, 12:54:14 pm »
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.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16580
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #12 on: September 25, 2024, 04:34:02 pm »
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/

Offline Tonyvic

  • SMF Gallery Pro Customer
  • Member
  • *****
  • Posts: 35
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #13 on: September 26, 2024, 12:54:10 pm »
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 »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16580
    • View Profile
Re: Item count on Gallery Tab shows double
« Reply #14 on: September 26, 2024, 12:59:20 pm »
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
4544 Views
Last post January 15, 2008, 08:44:36 pm
by Matth41
5 Replies
8679 Views
Last post May 15, 2008, 09:53:58 pm
by SMFHacks
1 Replies
3841 Views
Last post May 24, 2009, 06:51:30 pm
by SMFHacks
3 Replies
4035 Views
Last post February 27, 2010, 03:56:42 pm
by Wegg
4 Replies
3446 Views
Last post February 06, 2015, 12:19:43 pm
by SMFHacks

+- Recent Topics

Weird setup by SMFHacks
November 07, 2024, 06:37:41 am

Restoring a deleted photo by Monocero
November 01, 2024, 04:23:56 am

Gallery Pro reinstalation by Lirorobert
October 14, 2024, 01:43:43 am

Move picture from main gallery to user gallery by SMFHacks
October 11, 2024, 09:11:00 pm

quoting part of message by Lirorobert
October 04, 2024, 03:21:40 pm

Does SMF Gallery support by SMFHacks
October 02, 2024, 06:14:26 am

Item count on Gallery Tab shows double by SMFHacks
September 26, 2024, 12:59:20 pm

Forum post missing when image over 4000x pixels is uploaded to gallery by Michel68
September 24, 2024, 01:37:17 pm

Setting a photo as invisible by Monocero
September 17, 2024, 02:11:56 pm

Two gallery names by SMFHacks
September 15, 2024, 02:17:49 pm

Powered by EzPortal