Support » Plugin: Autoptimize » Possible issue with lost password page

  • kitchencraftcookware

    (@kitchencraftcookware)


    This is a continuation of another thread, thought I had the problem resolved.
    I have confirmed so far, that the problem deals with either of the 2 plugins I have used to minify/cache my site. I have tried Autoptimize and WP Fastest Cache and both cause the same issue; a white page on the lost/forgot password page. The rest of the site runs fine.
    Debug log shows:
    [12-Apr-2018 14:41:05 UTC] PHP Fatal error: Call to a member function get() on null in /public_html/wp-includes/cache.php on line 123
    If I deactivate the plugins, the lost password page works, but the site runs slower..

    Once I had applied the following code:

    // Disable autoptimize on pages with the word "account" in the URL
    add_filter('autoptimize_filter_noptimize','my_ao_noptimize',10,0);
    function my_ao_noptimize() {
    if (strpos($_SERVER['REQUEST_URI'],'account')!==false) {
    return true;
    } else {
    return false;
    }
    }

    The lost/forgot password page worked, however, once you login, the site goes blank except for manually going to the admin back-end.
    Error at this point is:
    [12-Apr-2018 17:09:28 UTC] PHP Fatal error: Call to a member function get() on null in /public_html/wp-includes/cache.php on line 123

    I do have 2 sites running with your plugin at this second, both are the same theme(different edits) and both of their cache.php files are the same. The other site (workign fine on the forgot/reset password page) is not running with login only which is where I had originally went for help.

    end writing of book, sorry for the long post. If it will help can show settings of AO as well. Both sites match there as well.

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

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

    (@optimizingmatters)

    OK, first and foremost; you seem to be also using JCH for JS optimization:

    
    <script type="application/javascript" src="https://weloveourchefs.com/wp-content/cache/jch-optimize/fae5a0b556fd5227192d26ee062c3d1a_1.js"></script>

    having 2 minification plugins that are active on the same code (JS in this case) can cause … weird issues. Can you disable JCH at least for JS optimization (or entirely, if only to test)?

    kitchencraftcookware

    (@kitchencraftcookware)

    Deactivated JCH. I also have both running on our main site, and they work nicely with each other there. Still getting the 500 error on the lost password page.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, can you try adding zxcvbn-async.min.js to AO’s comma-separated list of JS optimization exclusions (just a hunch, but I remember that filename as something that caused havoc earlier)?

    combining minifiers can break things, but does not always. if you make sure JCH only does CSS and AO does JS then it should be OK.

    kitchencraftcookware

    (@kitchencraftcookware)

    Okay, So I turned on JCH and at this point site is loading all pages, just slower than would be liked, and the password reset page is still fine.

    As soon as I turn on AO, i get a white screen on the site side, admin area is still fine. I did add the js file to the exclusions as well, still the same issue.

    kitchencraftcookware

    (@kitchencraftcookware)

    function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {
    	global $wp_object_cache;
    
    	return $wp_object_cache->get( $key, $group, $force, $found );
    }

    Is the function error getting called up in cache.php when I am seeing the white screen.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    morning @kitchencraftcookware;
    1. using both JCH and AO simultaneously can cause problems but even more importantly stops me from seeing the original JS in play on that password “forgot pasword” page, meaning I simply can’t help you.
    2. AO does not use the object cache, which I was so surprised you mentioned that wp_cache_get error (which is irrelevant for AO) and later pinpointed AO after all.
    3. I tested the code snippet to stop the account-pages from being autoptimized and it works perfectly.

    So don’t know exactly what’s happening here, but given the problem with the snippet en the wp_get_cache errors it’s probably more then just a problem with AO I’m afraid …

    frank

    kitchencraftcookware

    (@kitchencraftcookware)

    Frank,

    I appreciate you taking your time and trying to sort this. For the time being, I have turned off JCH and AO. Perhaps there is some other plugin that is interfering with the page caching. Perhaps you can see what JS is trying to run compared to your site on the password reset page specifically. If it would help, we can touch base via email for site access to get a better vantage point.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    afraid I’m using the default WordPress password reset page which autoptimize doesn’t optimize anyhow.

    let’s start by trying to exclude all of these:

    wp-content/plugins/wp-video-lightbox/js/video-lightbox.js
    wp-content/plugins/simple-download-monitor/js/sdm_wp_scripts.js
    wp-content/plugins/js_composer_salient/assets/js/vendors/woocommerce-add-to-cart.js
    wp-content/themes/salient/js/modernizr.js
    wp-content/themes/salient/nectar/assets/functions/ajax-search/wpss-search-suggest.js
    wp-content/plugins/sticky-menu-or-anything-on-scroll/assets/js/stickThis.js
    wp-content/themes/salient/js/magnific.js
    wp-content/themes/salient/js/superfish.js
    wp-content/themes/salient/js/init.js
    wp-content/plugins/woocommerce-checkout-field-editor/assets/js/wc-address-i18n-override.js

    if it works we can try removing those one by one until we have just what it takes to fix your password lost page, if it doesn’t work we’ll (have to) add more scripts to exclude.

    kitchencraftcookware

    (@kitchencraftcookware)

    Hi Frank,

    Sorry for the delayed response. Is there a way to connect with you beyond here, I would like to let you peek under the hood so to speak, as our main site is running your plugin, JCH Pro, and Smush together. There does not seem to be any errors on the plugins, so maybe I have tweaked a setting or such to allow them to work together. Figured if see everything it may make it clearer.

    Thanks You

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you can mail me at frank-at-optimizingmatters-dot-com 🙂

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