TinyPortal

Development => Support => Topic started by: Oldiesmann on June 23, 2019, 01:07:31 AM

Title: Duplicate shouts
Post by: Oldiesmann on June 23, 2019, 01:07:31 AM
Link to my forum: https://www.christianphotographers.com/community
SMF version: 2.1 RC2
TP version: 1.6.3
Default Forum Language: English
Theme name and version: Curve 2
Browser Name and Version: Chrome 75
Mods installed: TP, Optimus, Pretty URLs, SMF Gallery Pro
Related Error messages: None


I just added a shoutbox to the forum. I have it set up so it will submit shouts when you press enter. However, I discovered tonight that pressing enter results in the shout being submitted twice. If I don't hit enter and just click "Shout" instead, it only goes through once. I'd like to leave it as is for convenience but don't want duplicate shouts.
Title: Re: Duplicate shouts
Post by: lurkalot on June 23, 2019, 01:55:36 AM
Just tested this in TP 1.6.4 beta and it doesn't do it.  Haven't tried it in TP 1.6.3 but will asap.
Title: Re: Duplicate shouts
Post by: lurkalot on June 23, 2019, 01:59:05 AM
Quote from: lurkalot on June 23, 2019, 01:55:36 AM
Just tested this in TP 1.6.4 beta and it doesn't do it.  Haven't tried it in TP 1.6.3 but will asap.

Wonder if it's something do with the news fader you have running below it.
Title: Re: Duplicate shouts
Post by: lurkalot on June 23, 2019, 02:05:53 AM
 :hmm: Interesting, I have mine set Submit Shout on enter key? No

But it still shouts when hitting the enter or return key. Looks like it's a bug.  You might try setting it to No, and see if it'll only shout once, until we can fix it.
Title: Re: Duplicate shouts
Post by: lurkalot on June 23, 2019, 03:01:48 PM
Confirmed, still shouts pressing the enter or return key even when set to "No"

Setting to "Yes" results in the duplicate shout problem mentioned above.  Setting it back to "No" cures the duplicate shout problem, but it doesn't disable the Submit Shout on enter key as it should.

Thanks for the report.  ;)
Title: Re: Duplicate shouts
Post by: @rjen on June 23, 2019, 08:47:24 PM
mmm I see the problem: I have never really tested this setting. Has it even been functional?  If so, do you recall what version of TP it was in?
Title: Re: Duplicate shouts
Post by: lurkalot on June 23, 2019, 08:59:32 PM
Quote from: @rjen on June 23, 2019, 08:47:24 PM
mmm I see the problem: I have never really tested this setting. Has it even been functional?  If so, do you recall what version of TP it was in?

Glad you can see the cause.  Yes it did work, when tino first added it, but I haven't tested it either in last couple of releases, so not sure when it broke. 
Title: Re: Duplicate shouts
Post by: @rjen on June 23, 2019, 09:02:09 PM
It seems to be a Javascript function in Tpshout.php.

I do not have experience with Javascript, so not sure why it is not working anymore, but I think we had some javascript related issues some time ago?
Title: Re: Duplicate shouts
Post by: lurkalot on June 23, 2019, 09:05:22 PM
Quote from: @rjen on June 23, 2019, 09:02:09 PM
It seems to be a Javascript function in Tpshout.php.

I do not have experience with Javascript, so not sure why it is not working anymore, but I think we had some javascript related issues some time ago?

Thanks.  I did create an issue for this on GitHub, hopefully tino can take a look when he has a moment. 
Title: Re: Duplicate shouts
Post by: tino on June 24, 2019, 09:02:25 PM
I'm guessing Chrome has changed how it handles enter for submit boxes. Does it occur in other browsers?
Title: Re: Duplicate shouts
Post by: lurkalot on June 24, 2019, 09:25:35 PM
Quote from: tino on June 24, 2019, 09:02:25 PM
I'm guessing Chrome has changed how it handles enter for submit boxes. Does it occur in other browsers?

Tino, does it in IE, Edge, Firefox, and Chrome for me.
Title: Re: Duplicate shouts
Post by: tino on June 24, 2019, 10:50:50 PM
Ok, I'll look at it later this week if I can.
Title: Re: Duplicate shouts
Post by: tino on June 30, 2019, 11:52:37 AM
I can't recreate this bug, is it SMF 2.1 RC2 or the latest GitHub copy?
Title: Re: Duplicate shouts
Post by: lurkalot on June 30, 2019, 12:00:22 PM
Quote from: tino on June 30, 2019, 11:52:37 AM
I can't recreate this bug, is it SMF 2.1 RC2 or the latest GitHub copy?

My test site is running 2.1 RC2, don't think I've upgraded since.  It does it there.

It'll only duplicate the shouts if you enable the submit using enter key.  And turning that setting off you don't get the duplicate shouts, but you can still submit by pressing the enter key. It's almost like something's doubled up in the settings somewhere.
Title: Re: Duplicate shouts
Post by: tino on June 30, 2019, 12:02:13 PM
I tried that on SMF 2.1 RC2 and TinyPortal 1.6.3 and 1.6.4 with shout on enter key enabled and disabled. No issues.

QuoteGoogle Chrome is up to date
Version 75.0.3770.100 (Official Build) (64-bit)

Firefox Quantum
67.0.4 (64-bit)

Title: Re: Duplicate shouts
Post by: tino on June 30, 2019, 01:09:59 PM
I just upgraded to the latest GitHub version of SMF 2.1 and downloaded 1.6.3 from the SMF website again and installed those and have no issue here with all the settings they work as they should for me.
Title: Re: Duplicate shouts
Post by: lurkalot on June 30, 2019, 01:17:14 PM
Quote from: tino on June 30, 2019, 01:09:59 PM
I just upgraded to the latest GitHub version of SMF 2.1 and downloaded 1.6.3 from the SMF website again and installed those and have no issue here with all the settings they work as they should for me.

Thanks.  Must be the official RC2 then.  I was waiting for RC3 before upgrading my live test site again. Not sure what version @rjen is running, but he said he could see the problem, so I'm assuming that's three of us so far that have experienced it.

Quote from: @rjen on June 23, 2019, 08:47:24 PM
mmm I see the problem: I have never really tested this setting. Has it even been functional?  If so, do you recall what version of TP it was in?

Quote from: @rjen on June 23, 2019, 09:02:09 PM
It seems to be a Javascript function in Tpshout.php.

I do not have experience with Javascript, so not sure why it is not working anymore, but I think we had some javascript related issues some time ago?
Title: Re: Duplicate shouts
Post by: @rjen on June 30, 2019, 02:03:14 PM
I see the issue both in 2.0.15 an 2.1.
Title: Re: Duplicate shouts
Post by: lurkalot on June 30, 2019, 03:07:40 PM
Quote from: @rjen on June 30, 2019, 02:03:14 PM
I see the issue both in 2.0.15 an 2.1.

Strange.  So you get the same thing here on this site? It doesn't do it here for me. Or at least it didn't. Let me try it again.

Edit:  Nope works fine for me here.
Title: Re: Duplicate shouts
Post by: @rjen on July 02, 2019, 10:02:27 AM
Yep works fine here, but not on my 2.0.15 sites...

Maybe something to do with other mods...?
Title: Re: Duplicate shouts
Post by: lurkalot on July 02, 2019, 05:36:01 PM
Quote from: @rjen on July 02, 2019, 10:02:27 AM
Yep works fine here, but not on my 2.0.15 sites...

Maybe something to do with other mods...?

Might be the case, but for me on my 2.1 test site https://cctestsite.info/testsite3/index.php

where it does do the double shout thing, and not able to turn off the submit by enter key, that has no mods installed apart from TP 1.6.4