• Resolved rmcmorran

    (@rmcmorran)


    Following recent plugin updates, I’ve experienced unresponsive WYSIWYG text editors connected with the ACF Advanced Custom Fields PRO plugin in the WP page editor. After extensive troubleshooting, I found that problem is only fixed by disabling either ACF Pro version or by disabling Wordfence. Are there any known conflicts between Wordfence and ACF Pro?

    I first experienced this only a few days ago after with ACF updated to v. 5.8.14 (a subsequent update to v.5.9.0 does not resolve the issue). Wordfence is version 7.4.10.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @rmcmorran, thank-you for your query. ACF and Wordfence are fully compatible with WordPress 5.5 so it appears that a script to activate the text editors with ACF functionality is getting picked up by the firewall.

    Using Wordfence’s Learning Mode is recommended by following these instructions:

    From the Wordfence Dashboard click on Manage WAF. Then you will see Basic Firewall Options > Web Application Firewall Status. Change the option to Learning Mode. Now perform the actions that were causing issues. This will help Wordfence learn that these actions are normal and it will allow them in the future. After you have finished performing the actions, switch the WAF from Learning Mode back to Enabled and Protecting. Now test to see if these actions work correctly.

    https://www.wordfence.com/help/firewall/learning-mode/ is an amazing resource for learning more about the WAF and learning mode.

    Thanks,

    Peter.

    Thread Starter rmcmorran

    (@rmcmorran)

    Thanks for the reply. Sadly that solution had no effect – I even tried uninstalling and re-installing the ACF plugin during learning mode but the WYIWYG but to no effect.

    Plugin Support wfpeter

    (@wfpeter)

    @rmcmorran I’m sorry to hear that, let’s try another approach.

    Can you try loading one of the affected pages while keeping a Browser Console open to see if there are any JavaScript errors or files that fail to load? If you see any red text in the console, please take a screenshot, upload to Snipboard, include the link in your reply and I will help you interpret the errors.

    I take it you have continued running the updated 5.9.0 version of ACF mentioned in your initial post?

    Thanks again,

    Peter.

    Thread Starter rmcmorran

    (@rmcmorran)

    Hi thanks for the reply. Screengrab of the console as you suggest. There’s a 404 on a missing favicon which I need to fix, but that’s defintley not the issue here. The only error I’m getting is
    Uncaught TypeError: Cannot read property ‘selectText’ of null
    so I guess there’s some object missing? But it only occurs when Wordfence is active

    https://snipboard.io/JsBk2L.jpg

    Plugin Support wfpeter

    (@wfpeter)

    @rmcmorran Thanks for doing that for me.

    It appears that your theme or another plugin may have not been updated for WordPress 5.5 due to the change of deprecation for the jQuery Migrate development tool.

    Install the Enable jQuery Migrate Helper plugin below and see if Wordfence’s review button works afterwards:

    https://wordpress.org/plugins/enable-jquery-migrate-helper/

    You may also find this useful:

    https://wordpress.org/support/topic/read-this-first-wordpress-5-5-master-list/

    Thanks,

    Peter.

    Thread Starter rmcmorran

    (@rmcmorran)

    Hi – I have installed jQuery Migrate development tool but there is no change. I don’t know what to do next. Where is the Wordfence review button you mention? I have tried uninstalling and reinstalling Wordfence but to no avail.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @rmcmorran, I apologise for any inconvenience caused and I truly appreciate the steps you’re taking to help us get to the bottom of this. Don’t worry about checking the review button I spoke of.

    My next recommendation would be to back up your site and install a maintenance mode plugin (if you do not already use one.)

    When in maintenance mode, install and switch to the default 2020 theme, deactivate other plugins, and see if this issue is present when Wordfence and ACF Pro are the only active plugins. We have seen a number of WordPress 5.5 compatibility issues with themes and third-party plugins that haven’t been updated in time, so it would be good to 100% rule those out as a cause.

    If there is no problem with the 2020 theme installed and other plugins disabled, then the problem lies outside of Wordfence and ACF. You can then take steps to re-enable your theme and other plugins one-by-one to find the cause.

    Thanks again,

    Peter.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @rmcmorran, we’ve had an idea if the above suggestion seems a little daunting to troubleshoot manually.

    For your issue, you can try the Heath Check plugin by the WordPress.org team. When enabling Troubleshooting Mode, it deactivates all your plugins and reverts to the default theme (if installed), but only for the logged in user. Any other admins or site visitors see the normal site.

    This way, you can enable ACF and Wordfence together to see if the problem persists. If it does and the theme was changed, then we will know for sure that there is a conflict. If it doesn’t, then plugins can be enabled one-by-one until the problem returns. If all plugins are back on and everything works still, then try changing back to your site’s regular theme to see if that breaks it again.

    Using the health check plugin will mean there is no downtime for your site.

    Thanks again,

    Peter.

    Thread Starter rmcmorran

    (@rmcmorran)

    I originally used Heath Check plugin to isolate the issue 2 weeks ago, which is what led me to identify Wordfence as the source of the conflict and post here in the first place.

    Plugin Support wfpeter

    (@wfpeter)

    Hi @rmcmorran,

    We have some further steps that could be taken to confirm where the script load problem is originating from if you haven’t tried them already:

    • With AGCA disabled, does the same JavaScript error hit the browser console in the usual way as a red error, or does it disappear? Please provide a screenshot if the error itself changes or manifests in a different way.
    • If it hasn’t disappeared, see if the JavaScript error is still there for the ACF pages in different browser to usual, where cache has been cleared beforehand.
    • If the issue still happens, disable ALL browser extensions in the browser you don’t normally use (not in private/incognito mode).
    • If you still see the issue, use a maintenance mode plugin, as the health check & troubleshooting plugin is not always accurate. Switch to the 2020 WordPress theme and only have Wordfence and ACF active.
    • If the issue is still persisting, manually disable all Must-Use plugins if there are any.
    • If the error still hasn’t gone, you can add the following to wp-config.php to see what happens:

      define( 'CONCATENATE_SCRIPTS', false );

      This must go above the line that says:

      /* That's all, stop editing! Happy blogging. */

    Thanks,

    Peter.

    Thread Starter rmcmorran

    (@rmcmorran)

    Hi. thanks for all the suggestions. In the end I just gave up, deleted the page and started again and it seems to be OK. Looks like the page data got corrupted in some way that I don’t understand, but the simple solution was to give up and start all over again.

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

The topic ‘Conflict with ACF Advanced Custom Fields’ is closed to new replies.