Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Bigguy on December 28, 2018, 08:47:36 PM

Title: 1 alert
Post by: Bigguy on December 28, 2018, 08:47:36 PM
I just updated my site to the latest on GH. I know I have said this before...and I'm sorry, lol. At this point it can't be 2.1 doing this it has to be my install or something. I have 1 alert that will NOT go away...AT ALL, lol. It's gettin a bit annoying. Would anyone have ideas as to where I can look in the db for this one annoying alert that will not go away.
/me is pullin his hair out.
Title: Re: 1 alert
Post by: Bigguy on December 28, 2018, 08:56:08 PM
A few screenshots. If you clear the alert it comes back almost instantly. I have done all forum maintenance and am now in the database in smf_user_alerts. Not sure if that is the right place to be lookin but it looks like it is. Just not sure what I am lookin for.
Title: Re: 1 alert
Post by: lurkalot on December 29, 2018, 06:10:59 AM
Bigguy, I've got 142 alerts that won't go away on your site.  Mark them as read and they disappear. Visit site again after a few minutes and they're back again.
Title: Re: 1 alert
Post by: albertlast on December 29, 2018, 06:42:32 AM
You could look into your user_alerts table if you entry get marked as read.
Title: Re: 1 alert
Post by: Sesquipedalian on December 29, 2018, 07:02:29 AM
Try applying the changes in #5202 (https://github.com/SimpleMachines/SMF2.1/pull/5202), and then open the alert menu. On the next full page load, your alerts counter should start showing the correct value.

Of course, if you've had some mods installed that made a mess of things, all bets are off.
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 08:54:26 AM
Trying it now. I just edited Profile-View.php and my editor says there is an error somewhere in the lines between 293 and 297
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 10:16:02 AM
OK, I made a change. This is the bit of code that had an error:
             $possible_msgs[] = $alert['content_id'];
        elseif (isset($alert['extra']['topic']))
            $possible_topics[] = $alert['extra']['topic'];
        elseif (isset($alert['extra']['board']))
            $possible_boards[] = $alert['extra']['board'];

I changed it to:
             $possible_msgs[] = $alert['content_id'];
        if (isset($alert['extra']['topic']))
            $possible_topics[] = $alert['extra']['topic'];
        elseif (isset($alert['extra']['board']))
            $possible_boards[] = $alert['extra']['board'];

The error is gone now so I guess I will try this.
Title: Re: 1 alert
Post by: SychO on December 29, 2018, 10:35:14 AM
That changes the logic, what editor are you using and what is it saying ?
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 10:41:36 AM
It does work. Well, it got rid of the 1 damn alert anyway, lol. The error it produces now is this:
Undefined offset: 17
In Profile-View.php on line 389
It has been determined that my editor is out dated. I use php 7.0 on the server but the editor is onlly good for php 5.x I guess. The error I was getting in the editor was something about elseif.

syntax error unexpected elseif T_elseif
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 11:12:03 AM
I have tried this in two different editors. RapidPhp2018 and Php Designer. Both give the same error.
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 11:51:26 AM
OK, I updated both editors to use php 7 I still get the error message in both of them. Also, after the change I made I had this error in my logs. I'm not sure if it is still going to happen. I have cleared my error logs and will wait and see. I did take a screenshot of the errors though.
Title: Re: 1 alert
Post by: Sesquipedalian on December 29, 2018, 01:14:39 PM
I suspect that you accidentally deleted this line (https://github.com/SimpleMachines/SMF2.1/pull/5202/files#diff-01cc3a672ae60fbabf662b0bb5727534L294) when you deleted the others around it.
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 01:31:46 PM
I will make the changes here in a sec. I just got home.
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 01:37:30 PM
Ok, I reverted my changes and added that line and it should be good to go. I did miss that line btw, thank you.
Title: Re: 1 alert
Post by: Sesquipedalian on December 29, 2018, 03:52:47 PM
No problem. Thanks for continuing to report bugs so well, Bigguy. :)
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 04:11:51 PM
Lol, well thank you for saying that so kindly. :)  I know there not the best reports. I shoulda seen that line of code did not have one of those very tiny tiny minus signs beside it, lol. I'll try better next time. It seems Alerts are now running as expected as far as I can tell. :)
Title: Re: 1 alert
Post by: Bigguy on December 29, 2018, 10:45:30 PM
They are runnin very good so far. I need to ask about desktop alerts now, lol. A little window pops up in the lower right of the screen when an alert comes in. How do I increase the time that window stays there. (these have never worked before for me)
Title: Re: 1 alert
Post by: Sesquipedalian on December 30, 2018, 04:25:48 AM
Quote from: Bigguy on December 29, 2018, 10:45:30 PM
I need to ask about desktop alerts now, lol. A little window pops up in the lower right of the screen when an alert comes in. How do I increase the time that window stays there. (these have never worked before for me)

That's controlled by your browser and/or system settings.
Title: Re: 1 alert
Post by: Bigguy on December 30, 2018, 07:55:34 AM
Ok, thanks.
Title: Re: 1 alert
Post by: Bigguy on December 30, 2018, 09:36:45 AM
Might as well post this here. I am hearing from members on my site that I am the only one that has this drop down on the notifications page. (see screenshot) Why am I the only one that has this. Did I miss another line of code somewhere.
Title: Re: 1 alert
Post by: SychO on December 30, 2018, 09:43:22 AM
Isn't that the personal option Quick Moderation as Checkboxes from Look and Layout ?
Title: Re: 1 alert
Post by: Bigguy on December 30, 2018, 09:45:14 AM
Yes it is, lol. We just found that. Thank you. :)
Title: Re: 1 alert
Post by: Bigguy on December 31, 2018, 09:32:52 PM
Desktop alerts work fine and forum alerts work ok... There are problems. seeing as it is New years and I have had a few. I'll tell ya all about it next year.
Title: Re: 1 alert
Post by: Bigguy on January 04, 2019, 02:07:39 PM
Ok so let me see if I can explain. Say someone replies to a post of yours and it gives you an alert. You go check your alerts and use the link in it to go to the topic/post. With that done, you go back to alerts and clear it. (Mark read without going onto the notifications page) So with that done you start to browse again....all of a sudden another alert. You think damn I'm popular, lol. Check the alerts, nothing there. Go to the notifications page and there is the one alert marked read. It still shows up though. It will not stop giving an alert until you delete it from the notifications page.

Damn I hope that was right. I will get screenshots if I can for this. It does not produce errors.