Advertisement:

Author Topic: Users not getting like / mention alerts?  (Read 374 times)

Offline RandomDude

  • Semi-Newbie
  • *
  • Posts: 31
Users not getting like / mention alerts?
« on: February 10, 2019, 12:50:26 PM »
I am about to launch new forum and since this is the first time I'm using SMF 2.1 (RC1), I'm testing new features out first.

I enabled and set up like / mention systems properly (except for the alerts), but no alerts are displayed for users? Where do I enable this?


Thanks!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,788
    • StoryBB/StoryBB on GitHub
Re: Users not getting like / mention alerts?
« Reply #1 on: February 10, 2019, 12:54:15 PM »
It's a known bug in RC1 that the system that generates such notifications doesn't work correctly (or, indeed, at all)

From the lead developer:

Update:

A significant bug has been found in RC1 that prevents alerts and notification messages from being sent. A fix for this has already been included in the code on GitHub and will be available in RC2.

In the meantime, users of RC1 can fix this issue themselves by manually editing cron.php, which is located in the root folder of your forum (i.e., the same folder as index.php and SSI.php).

In cron.php, find these two lines of code (they are near the start of the file):

Code: (Find) [Select]
define('SMF', 'BACKGROUND');
define('FROM_CLI', empty($_SERVER['REQUEST_METHOD']));

Now replace them with the following:

Code: (Replace) [Select]
define('SMF', 'BACKGROUND');
define('SMF_VERSION', '2.1 RC1');
define('SMF_FULL_VERSION', 'SMF ' . SMF_VERSION);
define('SMF_SOFTWARE_YEAR', '2019');
define('FROM_CLI', empty($_SERVER['REQUEST_METHOD']));
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline RandomDude

  • Semi-Newbie
  • *
  • Posts: 31
Re: Users not getting like / mention alerts?
« Reply #2 on: February 10, 2019, 12:59:41 PM »
Thanks, it works!  ;D

Offline ForumMustang.com

  • Full Member
  • ***
  • Posts: 467
  • Gender: Male
  • SMF French Translator
    • forummustang on Facebook
    • Ford Mustangs
Re: Users not getting like / mention alerts?
« Reply #3 on: February 11, 2019, 11:45:12 AM »
Thank you. It worked for me too but since this modification, I am having cron errors in the logs that I didn't have before.

Quote
Type d'erreur: Cron
Message d'erreur: 8: Undefined index: id
Fichier: /home/mustvco/public_html/fr/Sources/Profile-Modify.php
Ligne: 2368
URL de la page causant l'erreur: https://www.mustangv8.com/fr/index.phphttps://www.mustangv8.com/fr/cron.php
Quote
#0: smf_error_handler_cron()
Appelé de /home/mustvco/public_html/fr/Sources/Profile-Modify.php en ligne 2368
#1: alert_count()
Appelé de /home/mustvco/public_html/fr/Sources/Subs.php en ligne 399
#2: updateMemberData()
Appelé de /home/mustvco/public_html/fr/Sources/tasks/CreatePost-Notify.php en ligne 236
#3: execute()
Appelé de /home/mustvco/public_html/fr/cron.php en ligne 211
#4: perform_task()
Appelé de /home/mustvco/public_html/fr/cron.php en ligne 105

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,788
    • StoryBB/StoryBB on GitHub
Re: Users not getting like / mention alerts?
« Reply #4 on: February 11, 2019, 11:51:36 AM »
Before, cron wasn’t even running, now it is hence the errors.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Online albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 513
Re: Users not getting like / mention alerts?
« Reply #5 on: February 11, 2019, 11:56:39 AM »
you could try this:
Profile-Modify.php search line:
Code: [Select]
if (!isset($user_info) || $user_info['id'] != $memID)
replace with
Code: [Select]
if (!isset($user_info['id']) || $user_info['id'] != $memID)

Offline ForumMustang.com

  • Full Member
  • ***
  • Posts: 467
  • Gender: Male
  • SMF French Translator
    • forummustang on Facebook
    • Ford Mustangs
Re: Users not getting like / mention alerts?
« Reply #6 on: February 11, 2019, 12:30:06 PM »
Before, cron wasn’t even running, now it is hence the errors.
Oh yes, you are right. ;D

you could try this:
Profile-Modify.php search line:
Code: [Select]
if (!isset($user_info) || $user_info['id'] != $memID)
replace with
Code: [Select]
if (!isset($user_info['id']) || $user_info['id'] != $memID)
Thank you. I applied the mod, opened the cron.php file with my browser and had no new error. I will let you know if it appears again.