Support » Plugin: WP Activity Log (formerly WP Security Audit Log) » Cannot use object of type WSAL_Models_OccurrenceQuery as array

  • Resolved Jos Klever

    (@josklever)


    Since the last update (4.0.3), there are errors in de logs I maintain via MainWP:
    AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Cannot use object of type WSAL_Models_OccurrenceQuery as array in /.../wp-content/plugins/wp-security-audit-log/wp-security-audit-log.php:682\nStack trace:\n#0 /.../wp-includes/class-wp-hook.php(287): WpSecurityAuditLog->mainwp_dashboard_callback(Array, Array)\n#1 /.../wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)\n#2 /.../wp-content/plugins/mainwp-child/class/class-mainwp-child.php(5828): apply_filters('mainwp_child_ex...', Array, Array)\n#3 /.../wp-content/plugins/mainwp-child/class/class-mainwp-child.php(1535): MainWP_Child->extra_execution()\n#4 /.../wp-includes/class-wp-hook.php(287): MainWP_Child->parse_init('')\n#5 /.../wp-includes/class-wp-ho...', referer: https:// myMainWP site .nl

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Contributor robertabela

    (@robert681)

    Sorry to see that you’re encountering such an issue @josklever

    Just to clarify, you’re seeing these errors on child websites on a MainWP network, correct? If that is the case, then:

    1) Do you know roughly how to reproduce this / what is causing this error?
    2) Is this happening on all child sites or on just a few of them?
    3) If it is happening on just a few of them, do you know / can you pin point something that these websites have in common?

    Looking forward to hearing from you and thank you for helping us solve this issue.

    It’s happening on the child sites. At least a couple of them. I haven’t checked all sites. It’s caused by traffic from my dashboard to the child site. Even on a test site, that has no traffic and only a few basic plugins (MainWP, Wordfence and WPSAL), there are these errors. Probably initiated by syncing or updating the sites.

    I hope you can use the trace in the error to know where the function is used and what it should do.

    Plugin Contributor robertabela

    (@robert681)

    Sorry for the late reply Jos. We’re lucky that we’ve been very busy lately.

    Unfortunately we could not reproduce the issue on our end. Do you have a staging or testing website on which this issue is reproducible? If yes, please send me an email so we can do some thorough troubleshooting.

    Thank you and have a great weekend. Looking forward to hearing from you.

    nvg

    (@nvg)

    Hi Robert we’re getting this error as well on all 5 sites we have it on (see log entry below). I tried installing it on a test site for you to check out but for some reason it’s not producing the error on that site even though it has the same settings. I’m unable to give you access to the live ones unfortunately. We’re pretty rushed on work right now or I would try to do some more testing with it. But I at least wanted to let you know. All five are child sites on MainWP as well.
    _________________
    [28-Apr-2020 15:36:51 UTC] PHP Fatal error: Uncaught Error: Cannot use object of type WSAL_Models_OccurrenceQuery as array in /public_html/wp-content/plugins/wp-security-audit-log/wp-security-audit-log.php:682
    Stack trace:
    #0 /public_html/wp-includes/class-wp-hook.php(287): WpSecurityAuditLog->mainwp_dashboard_callback(Array, Array)
    #1 /public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
    #2 /public_html/wp-content/plugins/mainwp-child/class/class-mainwp-child.php(5828): apply_filters(‘mainwp_child_ex…’, Array, Array)
    #3 /public_html/wp-content/plugins/mainwp-child/class/class-mainwp-child.php(1535): MainWP_Child->extra_execution()
    #4 /public_html/wp-includes/class-wp-hook.php(287): MainWP_Child->parse_init(”)
    #5 /public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #6 /public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #7 /public_html/wp-settings.php(540): do_act in /public_html/wp-content/plugins/wp-security-audit-log/wp-security-audit-log.php on line 682

    Plugin Contributor robertabela

    (@robert681)

    Thank you for your post @nvg

    I think we have nailed the issue already. In fact we have sent a test build to @josklever and so far things are looking promising. Please send us an email at support@wpwhitesecurity.com so we can send you the test build.

    Looking forward to hearing from you.

    Jos Klever

    (@josklever)

    I can confirm that the fix works, so I expect the release of the update very soon. 🙂

    nvg

    (@nvg)

    That was quick! I sent you an email thanks. 🙂

    Plugin Contributor robertabela

    (@robert681)

    Indeed @josklever this fix will be included in the next update. We do not have an exact data, however, the next update should be next week or the week after. Definitely not later than that.

    @nvg thank you for the email. We will send you the temp fix. We always do our best when handling support cases. By the way, since you use our plugin, would appreciate if you can rate it.

    Thanks a lot and have a good day. Thank you both for reporting this issue.

    nvg

    (@nvg)

    Thanks for the quick reply and the update!
    I have it installed on the five sites now and so far so good, no errors.

    Plugin Contributor robertabela

    (@robert681)

    Glad to hear the fix worked. We will include it in the next update. And thank you for the review @nvg. We really appreciate it.

    Have a good day and do not hesitate to get in touch should you have any other questions.

    Hi @robert681, after updating to version 4.0.4 the error is back, so I guess you forgot to include the fix…

    I can verify that it’s back too.

    Plugin Contributor robertabela

    (@robert681)

    Thank you for reporting this and I am really sorry this happened again. We are going to look into it and issue a fix with next week’s update (we got an update scheduled for next Tuesday or Wednesday).

    Plugin Contributor robertabela

    (@robert681)

    Hello @josklever and @nvg

    Sorry for the mishap here. We have the fix included in the release slated for next week. It was not in 4.0.4 because 4.0.4 is simply 4.0.3 but with a different name.

    You can reinstall the fix I had sent you. Otherwise, if you can wait, next Tuesday we are releasing 4.1.0, which includes the fix and many other updates.

    Sorry if this has caused any inconvenience.

    Ok no worries thanks for the update.
    I’ll just wait, MainWP will auto update it and we’ll be on our way 😉

    • This reply was modified 2 months, 1 week ago by nvg.
Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.