• The Sucuri Dashboard fails to load and states that there is no access to the wp-admin/admin-ajax.php

    The console throws up the following errors:

    Uncaught TypeError: Cannot read property ‘title’ of undefined
    at Object.success (admin.php?page=sucuriscan:468)
    at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2)
    at y (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4)
    at XMLHttpRequest.c (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4)
    (anonymous) @ admin.php?page=sucuriscan:468
    i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    y @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    c @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    XMLHttpRequest.send (async)
    (anonymous) @ VM656:1
    send @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    ajax @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    n.(anonymous function) @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    (anonymous) @ admin.php?page=sucuriscan:462
    i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    ready @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    K @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    admin.php?page=sucuriscan:507 Uncaught TypeError: Cannot read property ‘toString’ of undefined
    at writeQueueSize (admin.php?page=sucuriscan:507)
    at Object.success (admin.php?page=sucuriscan:532)
    at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2)
    at y (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4)
    at XMLHttpRequest.c (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4)
    writeQueueSize @ admin.php?page=sucuriscan:507
    (anonymous) @ admin.php?page=sucuriscan:532
    i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    y @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    c @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    XMLHttpRequest.send (async)
    (anonymous) @ VM656:1
    send @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    ajax @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    n.(anonymous function) @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    sucuriscanLoadAuditLogs @ admin.php?page=sucuriscan:525
    (anonymous) @ admin.php?page=sucuriscan:557
    setTimeout (async)
    (anonymous) @ admin.php?page=sucuriscan:556
    i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    ready @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    K @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @bob-wagstaff,

    Thank you for sharing the JavaScript error log.

    Can you also share the XML HTTP Request (XHR) response?

    The error in the JavaScript console says “TypeError: Cannot read property ‘title’ of undefined” after trying to execute this function [1], but strangely there is no such thing as “title” in the code, so I am not sure what the error is referring to. There’s also another error “Uncaught TypeError: Cannot read property ‘toString’ of undefined” from this other function [2] which is can actually be backtracked to the POST request a few lines after, when it passes the JSON object from variable data.

    Apparently, something in this function [3] is failing, but it is not clear what exactly. Sharing the raw response from the HTTP request will help. Hopefully there will be more information from there, however, if the response is empty we will have to go back and forth with a lot of questions while investigating this issue because I am unable to reproduce it in any of my websites, it seems to be failing only in your website, so I can only fix this with your help.

    I’ll wait for your reply.

    [1] sucuri-scanner/inc/tpl/auditlogs.html.tpl:L17-L59
    [2] sucuri-scanner/inc/tpl/auditlogs.html.tpl:L6-L15
    [3] sucuri-scanner/src/auditlogs.lib.php#L53-L75

    Thread Starter Bob Wagstaff

    (@bob-wagstaff)

    Is this what you wanted?

    XHR finished loading: POST “https://www.darjeelingindianrestaurant.co.uk/wp-admin/admin-ajax.php?page=sucuriscan”.
    (anonymous) @ VM244:1
    send @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    ajax @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    n.(anonymous function) @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    sucuriscanLoadAuditLogs @ admin.php?page=sucuriscan:525
    (anonymous) @ admin.php?page=sucuriscan:557
    setTimeout (async)
    (anonymous) @ admin.php?page=sucuriscan:556
    i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    ready @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    K @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:2
    VM244:1 XHR finished loading: POST “https://www.darjeelingindianrestaurant.co.uk/wp-admin/admin-ajax.php”.
    (anonymous) @ VM244:1
    send @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    ajax @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:4
    j @ heartbeat.min.js?ver=5.0.4:1
    (anonymous) @ heartbeat.min.js?ver=5.0.4:1
    setTimeout (async)
    k @ heartbeat.min.js?ver=5.0.4:1
    m @ heartbeat.min.js?ver=5.0.4:1
    n @ heartbeat.min.js?ver=5.0.4:1
    (anonymous) @ heartbeat.min.js?ver=5.0.4:1
    dispatch @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:3
    r.handle @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=5.0.4:3
    VM244:1 XHR finished loading: POST “https://www.darjeelingindianrestaurant.co.uk/wp-admin/admin-ajax.php”.

    Hello,

    The “XHR finished loading” you posted comes from the same JavaScript console, right? What I’m asking is to copy the raw HTTP response, from the “Network” panel. There’s a filter there that allows you to see the responses by type, like this:

    XHR Response (Google Chrome) — https://i.imgur.com/HZP3xmy.gif

    Thread Starter Bob Wagstaff

    (@bob-wagstaff)

    Again not sure that I got the right place, but here goes:

    <HTML><HEAD>
    <TITLE>Internal Server Error</TITLE>
    </HEAD><BODY>
    <H1>Internal Server Error – Read</H1>
    The server encountered an internal error or misconfiguration and was unable to
    complete your request.<P>
    Reference #3.97f78dcc.1554147127.50dacd3
    </BODY></HTML>

    Yes, that’s the one.

    So the plugin is failing to load the audit log because when the Ajax request is sent, the server is returning a “500 Internal Server Error”. So this really is a problem unique to your website, and not a bug in the plugin.

    Troubleshooting a 500 error is very difficult without access to the web server, because the problem in itself is very ambiguous. There’s a myriad of things that could cause that error, and it is always vague which makes things worse.

    The best thing I can say is, disable all plugins except Sucuri Scanner, then test again. If it works, then start enabling the other plugins one by one until the page fails, then you would have found the culprit. If the page fails to load even with all the plugins disabled, then we can start making patches to the code to see which specific line is causing the issue, but before we get there I want to rule out the first option.

    Let me know when you have tested with all the other plugins disabled.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin Forbidden’ is closed to new replies.