TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,230
  • Total Topics: 21,353
  • Online today: 446
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 108
  • Total: 108

TPShout showing shouts twice

Started by Nachtmeister, August 28, 2013, 08:08:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nachtmeister

Link to my site: catfish-divers dot eu
SMF version: 2.0.5
TP version: 1.107
Default Forum Language: German
Theme name and version: Meridian
Browser Name and Version: Chrome, Firefox and IE
Mods installed:
1.TinyPortal 2.Welcome Topic Mod 3.SMF Gallery Lite 4.Contact Page 5.Birthday Posts 6.Live Clock In Header 7.Google Route Map 1.0
8.Simple Audio Video Embedder 9.Separated Birthdays from Events 10.Bookmarks 11.SMF 2.0.5 Update
Related Error messages: None

Hi all,

I've got a strange problem. When some of my users post shouts in TPShout those shouts were shown twice, sometime even 3-4 times.
It doesn't depend on the rights of the user (admin, mod, regular user), nor does it depend on the browser.

When I take a look into the shoutbox table of the database, those shouts have just one entry, but within the shoutbox and even in the last 50 shouts they are shown twice (same shout, same timestamp etc.).

I haven't found anything yet on how to locate the problem or brake it down to a certain group of people.

Have you got any ideas about that?

Txs. alot for your help.

Greets
Dirk

IchBin

I see your problem indeed. Very strange, especially since it's doesn't seem to be related to a group or something. It does seem to be the same people having duplicate shouts but it doesn't look like they are part of the same member group or anything. Did you look in the mysql database, or are you referring to the admin if you were to go in and try to delete shouts.

Seems you are behind a couple of versions on TP though. You are using TP 1 RC3. There was an RC4 and then a final TP 1.0 release after that version. I do not remember if a bug was fixed in the shoutbox for anything like this. But I don't think there was.

Did you do anything recently to your site to change anything? Install another mod or anything?

Nachtmeister

Hi IchBin,

thanks for your quick reply.

It's always the same people having these problems, but besides that they've got nothing in common.

I checked the mysql db, to see whether the duplicate shouts are in the table as well.

Hmm, then I should upgrade my TP version first. Where can I find the newest version?

I've got this problems since I setup the new version of my forum a few months ago. Before I was using SMF 1.1.18 and the corresponding TP version.

Txs. for your help

Greets
Dirk

Nachtmeister

ok, I've installed what seems to be the latest version (TP 1.107), but no change to the shoutbox.

I've still got the same problem.

Greets
Dirk

IchBin

If you have double shouts within the last 20 entries in your shoutbox, can you run this query in phpmyadmin or whatever tool you have to access your database, and post the results back? I want to see if the query is returning double results somehow. If not, then we know something is happening in the code.

This assumes that your database table prefix is set to "smf_" (without quotes).
SELECT s.*, IFNULL(s.value3, mem.real_name) as realName,
mem.avatar, IFNULL(a.id_attach, 0) AS ID_ATTACH, a.filename, a.attachment_type as attachmentType
FROM smf_tp_shoutbox as s
LEFT JOIN smf_members AS mem ON (mem.id_member = s.value5)
LEFT JOIN smf_attachments AS a ON (a.id_member = s.value5 and a.attachment_type!=3)
WHERE s.value7 = 0
ORDER BY s.value2 DESC LIMIT 20

Nachtmeister

Hi IchBin,

I ran your query and found something interesting. When looking at the results of the query I can see the duplicates.
Looks like the entries differ in the filename of the avatar (i.e. first entry with filename avatar_75.png and second entry with filename avatar_75_1366448923.png) and the ID_ATTACH (256 and 8). The other columns had the same content.

I exported the query for you and in the csv file I couldn't find any duplicates although they were in the resultset.

Hmm, I tried to attach the files, but couldn't find anything where I can attach files to the thread.

Txs...
Dirk


IchBin

#6
Yeah sorry about that, you need 5 posts here before we allow you to attach files. I've upped your post count so you can attach on your next post.


Run this query on one of the user ID's that has a duplicate shout. Make sure you replace 1 with the member id of the user in question.

SELECT  id_member ,  id_attach,  attachment_type,  filename
FROM  smf_attachments
WHERE  id_member = 1
AND attachment_type != 3
LIMIT 0 , 30


It sounds to me like the user has a row in your attachments table for an avatar that they shouldn't.

Nachtmeister

Sorry for the late answer, I was off over the weekend.

After the last infos we got from your query I tought so as well.

I checked for all members having more than one avatar entry and viola all members having this duplicate shout problem
had two entries for avatars.

I removed the duplicates.

Now lets see, if they still have the problem or if it's solved.

Txs. alot for your help.

Nachtmeister

Hey  ;D ,

removing the duplicate avatar entries did the trick.

Now I have a bunch of happy campers in my forum.

Txs. for your help.

Greets
Dirk

IchBin

Glad you figured it out. I'll take a look at the code to see if there's some way we can form the query to ignore the duplicate for the future. Not sure what would cause SMF to have that extra attachment row.

This website is proudly hosted on Crocweb Cloud Website Hosting.