• Resolved wgm

    (@wgm)


    Hi,

    I get message to check website manually, but check does not start. Automatich check is working.

    Antivirus version is 1.4.4

    WordPress version is 6.3.1

    Thanks for help

    wgm

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Torsten Landsiedel

    (@zodiac1978)

    Hi @wgm

    if the manual check does not start, maybe the script is not working correctly.

    Can you please check your browser dev tools and look if the script is loaded correctly:
    /wp-content/plugins/antivirus/js/script.min.js?ver=1.4.4

    And if there are no JS errors in the console.

    Maybe there is an error which is preventing our script to be running.

    Sometimes Adblocker or some Security/Firewall rules in your network can cause this.

    If you are fine with working in the dev tools, you can also inspect the button itself and see if there is an event on it.

    Hope this helps!

    If not, please just reply again and we will try to help you to get this running!

    All the best,
    Torsten

    Thread Starter wgm

    (@wgm)

    Hi Torsten,

    thanks for Your response. I tried all Your notes, but no successs.

    In the browser dev tools I did not find any line with …/antivirus/js/… Maybe I did not look in the right place, because I am not so good in using the dev tools. There where some errors, but they didn’t point to antivirus.

    I deactivated all add-ons, but no success. In the firewall I made no changes since months.

    How can I inspect the button? When I put the mouse pointer over the butten, I can see this link

    https://www.example.com/wp-admin/options-general.php?page=antivirus#

    Clicking on the button, I see only alle the files appear on the page, but that’s all. In the past, checked filenames changed into green, but now nothing happens.

    Any idea?

    wgm

    Plugin Support Torsten Landsiedel

    (@zodiac1978)

    Hi @wgm

    In the browser dev tools I did not find any line with …/antivirus/js/

    This should be in the Network tab.

    There where some errors, but they didn’t point to antivirus.

    If there are JavaScript errors, this could lead to our code not running (correctly), because the error before prevents the execution of it.

    In the past, checked filenames changed into green, but now nothing happens.

    I think there is some error on the page, but without more info it is not easy to say. Can you share the error(s) from the console tab?

    Can you check the errorlog on the server?

    Can you try with every plugin disabled (only Antivirus running)?

    The Health Check plugin has a troubleshooting mode where you can do this without affecting your visitors. It is just disabled for you as an admin.

    Thanks in advance!

    All the best
    Torsten

    Thread Starter wgm

    (@wgm)

    Hi Torsten,

    my problem is solved – after an long time of testing and searching the error!

    I tried all Your tips, but no success. I enabled debugging and logging in WP, but no error messages, but there have been messages which are addressed to You:

    [30-Sep-2023 12:24:49 UTC] PHP Deprecated:  Constant FILTER_SANITIZE_STRING is deprecated in /var/www/vhosts/tsge.de/httpdocs/wp-content/plugins/antivirus/inc/class-antivirus.php on line 526

    You should check this.

    More things I have done.

    I use a child theme. Excluding folders with different template files for some plugins, but no success.

    Changing child theme to parent theme, manual antivirus check was running!

    Changing back to child theme and renamed the file functions.php, the antivirus check was running!

    Now, I edited the functions.php file in that way, that I removed a function, made a test and so on – but no success, no function was the reason for my problem.

    Add the end, I removed all functions, the file was empty, but no success. The reason were two (2)! blank lines on the end of the file. I did some more test with blank lines and found thes rules:

    WRONG:
    ------
    <?php
    :
    ?>
    ... <- blank line
    ... <- blank line
    
    WRONG:
    ------
    ... <- blank line
    <?php
    :
    ?>
    ... <- blank line
    
    CORRECT:
    --------
    <?php
    :
    ?>
    .... <- blank line

    The file funtions.php must start on top with the tag “<?php” and end with one (1)! blank line after the “?>” tag.

    In the past, my funtions.php was running. Maybe there was no additional blank line at the end or some updates rised my problem. Anyway, problem is solved!

    Plugin Support Torsten Landsiedel

    (@zodiac1978)

    Nice catch @wgm!

    The file funtions.php must start on top with the tag <?php and end with one (1)! blank line after the ?> tag. 

    Yes, it is best practice to omit the ?> completely, exactly because of these errors.

    For example: https://stackoverflow.com/questions/4410704/why-would-one-omit-the-close-tag

    Glad you found it!

    Thread Starter wgm

    (@wgm)

    Hi,

    I found in php manual https://www.php.net/manual/en/language.basic-syntax.phptags.php this:

     If a file contains only PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag, which may cause unwanted effects because PHP will start output buffering when there is no intention from the programmer to send any output at that point in the script. 

    wgm

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘manually antivirus scan does not work’ is closed to new replies.