• Resolved geekcohen

    (@geekcohen)


    Web Plugin Deactivated > Then Activated > Fatal Error

    When we deactivate the plugin, and then reactivate it again, it breaks the website.

    We have tried rolling back WordPress and no change. Running PHP 7.4 and WordPress 6.6 / 6.6.1.

    Let us know what other information you might require. Nothing in the error log indicates the plugin, it all points to ACF Pro as well. Tried updating ACF Pro to 6.3.4 and no change. This is the error in the log.

    28-Jul-2024 04:23:38 UTC] PHP Fatal error:  Uncaught Error: Call to a member function add_rewrite_tag() on null in /home/xxx/public_html/wp-includes/rewrite.php:176
    Stack trace:
    #0 /home/xxx/public_html/wp-includes/class-wp-post-type.php(709): add_rewrite_tag('%release%', '([^/]+)', 'release=')
    #1 /home/xxx/public_html/wp-includes/post.php(1807): WP_Post_Type->add_rewrite_rules()
    #2 /home/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/post-types/class-acf-post-type.php(132): register_post_type('release', Array)
    #3 /home/xxx/public_html/wp-includes/class-wp-hook.php(324): ACF_Post_Type->register_post_types(6)
    #4 /home/xxx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #5 /home/xxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #6 /home/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/acf.php(408): do_action('acf/init', 6)
    #7 /home/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-helpers. in /home/xxxx/public_html/wp-includes/rewrite.php on line 176

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm … so does the problem also occur when ACF is disabled?

    Thread Starter geekcohen

    (@geekcohen)

    Unfortunately due to the build of our site, we cannot confirm whether it does or not. As disabled ACF breaks our entire site including wp-admin due to its build.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that makes it a tad more difficult to troubleshoot obviously, but as the error log clearly identifies ACFPro as the one throwing a fatal error, it is likely that ACFPro somehow (AO does have an API through which some plugins change behavior) interacts with AO (or another plugin) being de-/re-activated.

    As I don’t have access to ACFPro’s codebase (and don’t really *know* the plugin) I cannot provide certainty, but the ACFPro team should be able to assist you here? Feel free to update here if/ when you have feedback from them, very curious what is causing this!

    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    were you able to contact/ get feedback from the ACF team already @geekcohen ?

    Thread Starter geekcohen

    (@geekcohen)

    Turns out it was related to the ACF CPT functionality and a database restart. It caused another issue which we found that to be the root cause.

    Apologise for this, it wasn’t anything to with your Autoptimize but ACF CPT & rewrites with some functionality we had developed.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no worries, fatal errors like that can be hard to identify, happy you were able to fix the problem! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.