Support » Plugin: WP Security Audit Log » Exception: Alert already registered with Alert Manager.

  • Resolved Marcus Downing

    (@marcusdowning)


    If you upgrade to WSAL 3.0 and see the message:

    Exception: Alert already registered with Alert Manager.

    then check whether you’re using RegisterGroup to register new alert types anywhere in your code. If you have, the format of the arguments has changed. Where you previous called:

    
    $auditLog = WpSecurityAuditLog::GetInstance();
    $auditLog->alerts->RegisterGroup(array(
      'Group name' => array(
        array(MY_ALERT_ID, E_NOTICE, 'My Alert', 'Something happended I need to know about.'),
      )
    ));
    

    You need to change this to nest all your alerts in a subcategory:

    
    $auditLog = WpSecurityAuditLog::GetInstance();
    $auditLog->alerts->RegisterGroup(array(
      'Group name' => array(
        'Subgroup name' => array(
          array(MY_ALERT_ID, E_NOTICE, 'My Alert', 'Something happended I need to know about.'),
        )
      )
    ));
    

    This change is NOT reflected in the comment for the method.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WPWhiteSecurity

    (@wpwhitesecurity)

    hello @marcusdowning,

    Thank you for using our plugin.

    That’s an interesting way of adding custom alerts though it is not what we recommend, hence why there are chances of encountering such errors. Ideally you should stick to the code format give in our custom alert logging documentation.

    Should there be anything else we can assist you with, please do not hesitate to get in touch.

    Have a good day.

    That method recommends adding files in wp-content/uploads/wp-security-audit-log/. That works for a single site, but not for a plugin that wishes to define event types on any site they’re installed on.

    Plugin Author WPWhiteSecurity

    (@wpwhitesecurity)

    Hi @marcusdowning,

    At the moment custom alerts do not work on multisite but it is something we will be working on in the near future.

    Thanks for using our plugin. Should there be anything else we can assist you with, do not hesitate to ask.

    Have a good day.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exception: Alert already registered with Alert Manager.’ is closed to new replies.