Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Bigguy on December 30, 2018, 09:39:09 AM

Title: No ip
Post by: Bigguy on December 30, 2018, 09:39:09 AM
What's up with this guy. Why does he not show an ip.
Title: Re: No ip
Post by: Aleksi "Lex" Kilpinen on December 30, 2018, 10:23:40 AM
For some reason it failed to resolve I'd guess, but why exactly - no idea.
Title: Re: No ip
Post by: Bigguy on December 30, 2018, 10:41:04 AM
This bot/person keeps hittin the cron.php file every 5 to 6 minutes.
Title: Re: No ip
Post by: Illori on December 30, 2018, 12:04:08 PM
that is normal. otherwise many functions of SMF 2.1 would not work correctly, like the alerts.

they are not directly hitting it but causing it to run in the background due to guest activity.

[edit] check your scheduled tasks etc, seems one may have had this entry and the corresponding email template no longer exists, so you need to remove it.
Title: Re: No ip
Post by: Bigguy on December 30, 2018, 12:23:23 PM
I don't see anything in scheduled tasks to remove. Nothin jumps out at me anyway.
Title: Re: No ip
Post by: Illori on December 30, 2018, 12:29:04 PM
search your database and files for notification_edit and see what is calling it, i dont have it in my files from github that i can see.
Title: Re: No ip
Post by: Bigguy on December 30, 2018, 12:33:27 PM
That's weird. I know I didn't put it in there. Maybe TP ?? I only have like 3 or 4 mods installed....Gallery, Arcade...Hmm, arcade sends out notifications. I wonder if it could be from that.
Title: Re: No ip
Post by: Arantor on December 30, 2018, 12:34:31 PM
Unless the arcade knows how to do 2.1 style alerts, it seems unlikely...
Title: Re: No ip
Post by: Bigguy on December 30, 2018, 12:44:20 PM
These are all the mods I have and the one crossed out is not installed. So I can't see it being a mod at all.
Title: Re: No ip
Post by: Bigguy on December 30, 2018, 12:52:12 PM
Maybe this would help
Title: Re: No ip
Post by: Chen Zhen on December 31, 2018, 12:14:40 PM

Function names concerning email templates for the Arcade have the word "arcade" in them.
The code concerning alerts (email and pm) are located in ../Sources/Subs-Arcade.php using the arcadeEvent() function.
Your reported errors do not appear to be from the Arcade.

Title: Re: No ip
Post by: Bigguy on December 31, 2018, 12:37:45 PM
Well....I'm at a lose. That error was not there before the upgrade so I am not sure what it is.
Title: Re: No ip
Post by: Bigguy on January 03, 2019, 09:16:19 AM
I looked in my error log and found this that pertains to the error in SMF I have...I think.
/home/*****/public_html/cron.php(208): CreatePost_Notify_Background->execute()
/home/*****/public_html/cron.php(102): perform_task(Array)


EDIT:
And maybe this one to:

/home/****/public_html/Sources/tasks/CreatePost-Notify.php(188): parse_bbc('Hey it's su...', false)
Title: Re: No ip
Post by: Bigguy on January 03, 2019, 09:21:43 AM
This is in there as well:

PHP Fatal error:  Uncaught Error: Call to undefined function allowedTo() in /home/*****/public_html/Sources/Subs-Attachments.php:968
Title: Re: No ip
Post by: Bigguy on January 03, 2019, 10:56:20 PM
Well I have searched everything but the database. So I guess that is my next stop.
Title: Re: No ip
Post by: Sesquipedalian on January 04, 2019, 01:21:35 PM
I've looked into this, and it is a legitimate bug. It was hard to track down, but apparently it was introduced long ago in this commit (https://github.com/SimpleMachines/SMF2.1/commit/60494d8c050e9a9c4ae56db2486edadea4901c03). If you look there, you'll see on line 2081 that a notification is being created with its "type" set to "edit" even though there is otherwise no such thing as an "edit" notification in SMF.

This reason it has taken so long for this bug to manifest is probably that a very specific set of circumstances are required before it will trigger any errors. Specifically, a post containing a mention needs to be modified in a topic that being watched by some other user who has selected the option to be notified by email immediately whenever there is new activity in their watched topics. If that particular scenario occurs, SMF ends up trying to send an email notification using non-existent "notification_edit" email templates.

Unfortunately, merely changing that "type" value from "edit" to something that actually exists, such as "reply", isn't a good solution. That would avoid generating error messages in the log, but it would cause false "new reply" email notifications to be sent out to users watching the topic when what really happened was that an existing post containing a mention was modified. That would be wrong, and avoiding it is probably the reason why a different notification type was introduced here in the first place. The best solution is to follow through on that idea and implement proper handling of the "edit" notification type. So I'm working on a PR for that now.
Title: Re: No ip
Post by: Bigguy on January 04, 2019, 01:46:00 PM
Your...your like a savior. I can stop pulling out my hair now, lmao. Thank god you found it. This error pops up about as much as the 1 Alert post I made in this board. It was drivin me wacko. Thank you sir for finding this. :)
Title: Re: No ip
Post by: Sesquipedalian on January 04, 2019, 09:07:01 PM
Bigguy, please test the changes in https://github.com/SimpleMachines/SMF2.1/pull/5321 to see if that resolves the issue.
Title: Re: No ip
Post by: Bigguy on January 04, 2019, 09:36:19 PM
Testing now.
Title: Re: No ip
Post by: Bigguy on January 04, 2019, 09:56:45 PM
Well, I woulda had errors by now I know I would have. I can post back when I get up tomorrow though to make sure it is workin. It looks good though. Thank you sir. :)
Title: Re: No ip
Post by: Bigguy on January 05, 2019, 07:03:12 AM
Posted on GH about this but I think it is solved. No errors here.
Title: Re: No ip
Post by: Sesquipedalian on January 05, 2019, 01:58:18 PM
Excellent. Merged.