• Resolved racosgrave

    (@racosgrave)


    Updated to WP 4.7.4 then updated to the most recent version of this plugin. Whole site crashed with this error:

    Fatal error: Uncaught exception 'Exception' with message 'Alert already registered with Alert Manager.' in \wp-content\plugins\wp-security-audit-log\classes\AlertManager.php:209 Stack trace: #0 \wp-content\plugins\wp-security-audit-log\classes\AlertManager.php(231): WSAL_AlertManager->Register(Array) #1 \wp-content\plugins\wp-security-audit-log\defaults.php(26): WSAL_AlertManager->RegisterGroup(Array) #2 \wp-content\plugins\wp-security-audit-log\defaults.php(349): load_include_custom_file(Object(WpSecurityAuditLog)) #3 [internal function]: wsaldefaults_wsal_init(Object(WpSecurityAuditLog)) #4 \wp-includes\class-wp-hook.php(298): call_user_func_array('wsaldefaults_ws...', Array) #5 \wp-includes\class-wp-hook.php(323): WP_Hook->apply_filters('', Array) #6 \wp-includes\plugin.php(453): WP_Hook->do_action(Array) #7 \wp-content\plugins\wp-security-audit-log\wp-security-audit-l in \wp-content\plugins\wp-security-audit-log\classes\AlertManager.php on line 209

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

    (@wpwhitesecurity)

    Hello @racosgrave,

    Thank you for using our plugin and sorry to see you’re encountering such issues.

    By any chance, have you created custom alerts in the plugin?

    Thread Starter racosgrave

    (@racosgrave)

    Yes, I have 1 Custom Alert setup

    Plugin Author WPWhiteSecurity

    (@wpwhitesecurity)

    Can you download the latest custom alert files and update it? We have updated it with the latest version.

    Please keep me posted.

    Thread Starter racosgrave

    (@racosgrave)

    OK so I took a look at the custom alert files and the only change appears to be in the custom-alerts.php where the original array was

    <?php
    $custom_alerts = array(
        __('Custom Alerts', 'wp-security-audit-log') => array(
            array(4444, E_NOTICE, __('Downloaded File Alert', 'wp-security-audit-log'), __('User downloaded the file ' . '%File%' . ' from page %PageTitle%' . ' view the page %PageUrl%' . '</a>', 'wp-security-audit-log'))
        )
    );
    
    ?>

    is now

    <?php
    $custom_alerts = array(
    	__('Third Party Support', 'wp-security-audit-log') => 
    	array(
    		__('Custom Alerts', 'wp-security-audit-log') => 
    		array(
    			array(4444, E_NOTICE, __('Downloaded File Alert', 'wp-security-audit-log'), __('User downloaded the file ' . '%File%' . ' from page %PageTitle%' . ' view the page %PageUrl%' . '</a>', 'wp-security-audit-log')
    			)
    		)
    	)
    );
    ?>

    Where the only change appears to be is that $custom_alerts is encased in another array

    • This reply was modified 6 years, 11 months ago by racosgrave.
    • This reply was modified 6 years, 11 months ago by racosgrave.
    Plugin Author WPWhiteSecurity

    (@wpwhitesecurity)

    Correct. Did the “fix” work? It definitely means we need to work on better exception handling in this case.

    Thread Starter racosgrave

    (@racosgrave)

    Yep all good now thanks!

    Plugin Author WPWhiteSecurity

    (@wpwhitesecurity)

    Sorry for the inconvenience. We will look into improving the exception handling in this particular case. Glad it is solved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Plugin broke site on update….’ is closed to new replies.