BuddyDev

Search

BuddyPress Clear Notifications

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #47828

    Hi there, BuddyPress Clear Notifications adds a link in the notifications drop down menu.

    I think we are many who do not use the WP menu on our BP site. Would it be possible to add a link to clear all the notifications in member settings or as an extra option on the notification page?

    I would prefer this to happen automatically but BuddyPress Auto Clean Notifications does not work for me.

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #47837

    Hi Carsten,
    Thank you for the question.

    The BuddyPress Notification widget add the clear notification options for clearing the notifications.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #48087

    Hi Brajesh, thanks for your answer. I want all notifications auto deleted after some time, so they do not fill up the database.

    Therefore I installed BuddyPress Auto Clean Notifications plugin, but it does not work.

    Even if I change the default deletion period to one day days, one of my test profiles still have 772 notifications, so it’s definitely not working.

    What can be wrong?

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #48093

    Hi Carsten,
    Please install WP Crontol plugin and check if the cron jobs are working for the auto clear plugin. That seems to be the issue.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #48102

    Hi Brajesh, thanks for your help, I think you are right, something is not as it should be with the cron jobs also affecting notifications.

    https://imgur.com/jJRWgLx

    https://imgur.com/N2wXMZU
    Cron jobs is on in my wp-cron.php define( 'DOING_CRON', true );

    Why are these jobs not run?

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #48111

    Hi Carsten,
    Thank you.

    I will suggest setting up a system cron instead of the default wp cron.
    https://kinsta.com/knowledgebase/disable-wp-cron/

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #48116

    Hi Brajesh, thanks for the suggestion, I will take a look at that. But there must be something profound wrong with the WP system cron

    If I do an Auto Run, this error comes up:

    Failed to schedule the cron event bp_auto_clear_notifications_cleanup_task.

    Also the time stamp is completly wrong:

    1970-01-01 01:00:01
    53 years 1 month ago

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #48117

    Hi Brajesh, I have disabled the WP cron job, and taked over cron through a task in my Plesk control panel instead.

    The notifications has not cleared yet, but lets see how it goes 😉

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #48123

    Hi Carsten,
    I will suggest clearing those pending jobs if they are not running manually(you can delete it using WP Crontol).

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #48125

    Hi Brajesh, after taking over wp-cron.php, the cron jobs are carried out, but there are no changes in the amount of notifications, do the old notifications added before installing Auto Clean Notifications plugin not be affected, so I have to clean up the database?

    https://imgur.com/6AEnCof

    Regards
    Carsten

You must be logged in to reply to this topic.

This topic is: not resolved