• Resolved Atanu

    (@iwdatanu)


    Hi, previously I’ve wordfence installed and fully setup in a WP site. But suddenly I noticed that some of Wordfence admin pages not opening fully. So I’ve completely remove the plugin including DB tables and do a fresh install. But after that I can’t add a free license. It continuously showing incomplete options in admin pages and showing a console error as – “Uncaught SyntaxError: Cannot use import statement outside a module (at wordfence.1778685035.js?ver=8.2.2:1:1)”.

    Also when I open “All Options” admin page, it is showing as broken.

    Here is a screenshot for diagonostics report-

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support wfphil

    (@wfphil)

    Hi @iwdatanu

    Something on your site is preventing Wordfence’s script_loader_tag filter from taking effect, or is rewriting/removing the attribute.

    On a staging site with the same fault, please try switching to the default theme Twenty Twenty-Five and disable all other plugins, MU plugins, and Drop-In plugins. If the fault is fixed then you will need to enable your normal theme and all three types of plugins one-by-one to find the cause of the fault.

    Thread Starter Atanu

    (@iwdatanu)

    Hi,

    I’ve activated a default theme “Twenty Twenty-Five”. Deactivated all other plugins. But I’m still gettings same error and can not setup Wordfence fully.

    The console error is – “Uncaught SyntaxError: import declarations may only appear at top level of a module wordfence.1778685035.js:1:1

    FYI, I’ve modified “wp-content” directory name to “frontend”, “plugins” to “modules”.

    define('WP_CONTENT_FOLDERNAME', $env['WP_CONTENT_FOLDERNAME']);
    define('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME);
    define('WP_CONTENT_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/' . WP_CONTENT_FOLDERNAME);
    define('WP_PLUGIN_DIR', WP_CONTENT_DIR . "/". $env['WP_PLUGIN_FOLDERNAME'] );
    define('WP_PLUGIN_URL', WP_CONTENT_URL . "/" .$env['WP_PLUGIN_FOLDERNAME'] );

    I’m not sure but can you please suggest if that could be the reason. Please suggest for a solution.

    Thread Starter Atanu

    (@iwdatanu)

    Hi,

    I’ve tested with changing “modules” directory name back to “plugins”. It works perfectly. So it means there are something wrong in the plugin’s latest version. Because I did not face such issue before. Please check and fix the issue asap. Otherwise we can’t able to use the plugin.

    There are so many websites for which we have changed the default directory name for long time. All are having same problem right now. It is really difficult for us to change back to original directory name right now. So please fix this issue as a high priority and asap.

    • This reply was modified 3 days, 22 hours ago by Atanu.
    • This reply was modified 3 days, 22 hours ago by Atanu.
    Plugin Support wfphil

    (@wfphil)

    Hi @iwdatanu

    Thank you for the update that the fault is fixed by renaming the directory for WordPress plugins back to its correct name.

    Technically, it’s a bug, but we should not have to expect the plugins directory to be renamed as modules so please do not use that name for the directory for WordPress plugins.

    Thread Starter Atanu

    (@iwdatanu)

    WordPress alllow to do change the plugin directory name as “define( ‘WP_PLUGIN_DIR’ )”. Then why should we not use that. And we are using this for a long time now in several websites. Never get that issue… It must be something inside Wordfence plugin’s latest version that need to be fix.

    You guys also need to consider all WP golbal variables in your code base. Please fix that issue asap.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.