• carshw7

    (@carshw7)


    Hi Averta Support Team,

    I hope this message finds you well.

    I am writing to report a JavaScript bug introduced in the latest update of the Phlox free theme (version 2.17.22). I have detected this exact same issue across 3 different websites using this theme.

    After investigating, the issue comes from the scripts.min.js file. The code uses document.querySelector() on links, but fails because a selector is empty.

    Here are the details of the environment :

    • Theme Name: Phlox (Free version)
    • Theme Version: 2.17.22
    • WordPress Version: 6.x (using jQuery 3.7.1)

    Console error messages:

    jquery.min.js?ver=3.7.1:2 jQuery.Deferred exception: Failed to execute 'querySelector' on 'Document': The provided selector is empty. SyntaxError: Failed to execute 'querySelector' on 'Document': The provided selector is empty.
    at https://example.com
    at Array.forEach (<anonymous>)
    at HTMLDocument.<anonymous> (https://example.com)

    jquery.min.js?ver=3.7.1:2 Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document': The provided selector is empty.
    at scripts.min.js?ver=2.17.22:1:1538
    at Array.forEach (<anonymous>)
    at HTMLDocument.<anonymous> (scripts.min.js?ver=2.17.22:1:1503)

    It seems the script loops through elements (like links) and passes an empty attribute value to querySelector, which triggers the syntax error and breaks jQuery execution.

    Note : I temporary patched this issue on my websites by adding a check to ensure the attribute/selector is not empty before running querySelector(). It works perfectly now.

    Could you please pass this on to your development team for a quick patch?

    Thank you for your assistance.

    Best regards,

    carshw7

You must be logged in to reply to this topic.