Forum Replies Created

Viewing 15 replies - 31 through 45 (of 61 total)
  • Thread Starter Brian Henry

    (@brianhenryie)

    OK, I’ve a support ticket open with SiteGround for an issue: “failed to open stream: Too many open files”. I’m working to get more information for support now (trying to get a debug backtrace).

    It was certainly the page load when I clicked deactivate on SiteGround Optimizer when all the plugins deactivated. We’ve activated/deactivated other plugins without issue since then. My guess right now is deactivate function runs early on WordPress load (I presume – makes sense) and the clearing of the cache by you resulted in too many file handles being used before any plugins were loaded. Then as WordPress tried to load the active plugins, and each returned an error rather than the file, it proceeded to disable each.

    PHP Warning: fopen(/home/customer/www/domain.com/public_html/wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: Too many open files in /home/customer/www/domain.com/public_html/wp-includes/functions.php on line 6109

    This also leads me to believe the issue is unrelated to any plugins I have installed.

    I think WordPress could mitigate against this by doing a test fopen on a known file before loading plugins. I might open an issue when I understand more.

    You could mitigate against it by finishing your deactivate code with a check on a known file and run die() if you encounter an error.

    Look into https://github.com/coenjacobs/mozart for namespace prefixing. There are still some issues with Guzzle but there are already PRs written to fix the problems.

    Thread Starter Brian Henry

    (@brianhenryie)

    The latter part of the first post (~line 226) should use filter_input rather than filter_var.

    Thread Starter Brian Henry

    (@brianhenryie)

    Thanks. It would be great if it were possible to open support tickets there without an account, e.g. paste in the licence key to verify.

    I’ll ask my colleague to log in and see is there an update available (we’re on 1.4), since I figure it’s never going to see an update from inside WordPress.

    Thread Starter Brian Henry

    (@brianhenryie)

    This caused further issues.

    Thread Starter Brian Henry

    (@brianhenryie)

    This is certainly not resolved. There are countless logs being generated by the plugin.

    Where would you like the report sent?

    • This reply was modified 3 years, 11 months ago by Brian Henry.

    The solution to this was highlighted to the developers four months ago and we are still waiting for them to acknowledge it:

    https://www.ads-software.com/support/topic/recent-update-causing-php-error/#post-13223852

    In other issues they mark it as “resolved”:

    https://www.ads-software.com/support/topic/media_buttons_context-deprecated-2/

    The log itself holds the answer:

    
    PHP Deprecated:  media_buttons_context is <strong>deprecated</strong> since version 3.5.0! Use media_buttons instead. in /path/to/wp-includes/functions.php on line 5234
    

    Stacktrace:

    
    /path/to/wp-includes/plugin.php(638): _deprecated_hook('media_buttons_c...', '3.5.0', 'media_buttons', '')
    /path/to/wp-admin/includes/media.php(656): apply_filters_deprecated('media_buttons_c...', Array, '3.5.0', 'media_buttons')
    /path/to/wp-includes/class-wp-hook.php(287): media_buttons('acf_content')
    /path/to/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    /path/to/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    /path/to/wp-includes/class-wp-editor.php(235): do_action('media_buttons', 'acf_content')
    /path/to/wp-includes/general-template.php(3536): _WP_Editors::editor('', 'acf_content', Array)
    /path/to/wp-content/plugins/advanced-custom-fields-pro/includes/assets.php(521): wp_editor('', 'acf_content')
    /path/to/wp-includes/class-wp-hook.php(287): ACF_Assets->print_uploader_scripts('')
    /path/to/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    /path/to/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    /path/to/wp-admin/admin-footer.php(78): do_action('admin_footer', '')
    /path/to/wp-admin/post.php(369): require_once('/home/customer/...')
    {main}
    
    Thread Starter Brian Henry

    (@brianhenryie)

    Also:

    PHP Deprecated: get_used_coupons is <strong>deprecated</strong> since version 3.7! Use WC_Abstract_Order::get_coupon_codes instead. in /path/to/wp-includes/functions.php on line 4859

    
    #0 /path/to/wp-includes/class-wp-hook.php(287): BH\includes\Functions->log_deprecated_functions_only_once_per_day('get_used_coupon...', 'WC_Abstract_Ord...', '3.7')
    #1 /path/to/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #2 /path/to/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /path/to/wp-includes/functions.php(4839): do_action('deprecated_func...', 'get_used_coupon...', 'WC_Abstract_Ord...', '3.7')
    #4 /path/to/wp-content/plugins/woocommerce/includes/wc-deprecated-functions.php(54): _deprecated_function('get_used_coupon...', '3.7', 'WC_Abstract_Ord...')
    #5 /path/to/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-order.php(609): wc_deprecated_function('get_used_coupon...', '3.7', 'WC_Abstract_Ord...')
    
    #6 /path/to/wp-content/plugins/awin-advertiser-tracking/awin-advertiser-tracking.php(172): WC_Abstract_Legacy_Order->get_used_coupons()
    
    #7 /path/to/wp-includes/class-wp-hook.php(287): awin_thank_you(60812)
    #8 /path/to/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #9 /path/to/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #10 /path/to/wp-content/themes/enhanced/woocommerce/checkout/thankyou.php(82): do_action('woocommerce_tha...', 60812)
    

    Change line 172 from:
    $coupons = $order->get_used_coupons();
    to
    $coupons = $order->get_coupon_codes();

    Thread Starter Brian Henry

    (@brianhenryie)

    Deprecated function WC_Abstract_Legacy_Order::get_product_from_item in woofunnels-customer-functions.php:104

    
    #0 /path/to/wp-includes/class-wp-hook.php(287): BH\includes\Functions->log_deprecated_functions_only_once_per_day('WC_Abstract_Leg...', '$item->get_prod...', '4.4.0')
    #1 /path/to/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #2 /path/to/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /path/to/wp-includes/functions.php(4839): do_action('deprecated_func...', 'WC_Abstract_Leg...', '$item->get_prod...', '4.4.0')
    #4 /path/to/wp-content/plugins/woocommerce/includes/wc-deprecated-functions.php(54): _deprecated_function('WC_Abstract_Leg...', '4.4.0', '$item->get_prod...')
    #5 /path/to/wp-content/plugins/woocommerce/includes/legacy/abstract-wc-legacy-order.php(320): wc_deprecated_function('WC_Abstract_Leg...', '4.4.0', '$item->get_prod...')
    #6 /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/woofunnels-customer-functions.php(104): WC_Abstract_Legacy_Order->get_product_from_item(Object(WC_Order_Item_Product))
    #7 /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/woofunnels-contact-functions.php(147): bwf_create_update_customer(Object(WooFunnels_Contact), Object(Automattic\WooCommerce\Admin\Overrides\Order), '60812', Array, 0)
    #8 /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/class-woofunnels-db-updater.php(111): bwf_create_update_contact('60812', Array, 0, false)
    #9 /path/to/wp-includes/rest-api/class-wp-rest-server.php(1160): WooFunnels_DB_Updater::capture_order_status_change_event(Object(WP_REST_Request))
    #10 /path/to/wp-includes/rest-api/class-wp-rest-server.php(1007): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/woofunnel_cust...', Array, NULL)
    #11 /path/to/wp-includes/rest-api/class-wp-rest-server.php(440): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #12 /path/to/wp-includes/rest-api.php(354): WP_REST_Server->serve_request('/woofunnel_cust...')
    #13 /path/to/wp-includes/class-wp-hook.php(287): rest_api_loaded(Object(WP))
    #14 /path/to/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #15 /path/to/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #16 /path/to/wp-includes/class-wp.php(388): do_action_ref_array('parse_request', Array)
    #17 /path/to/wp-includes/class-wp.php(745): WP->parse_request('')
    #18 /path/to/wp-includes/functions.php(1291): WP->main('')
    #19 /path/to/wp-blog-header.php(16): wp()
    #20 /path/to/index.php(17): require('/home/customer/...')
    #21 {main}
    

    Logging was already off for me.

    I only saw the error alongside errors from another plugin that was throwing fatal errors because it was using a WooCommerce function before WooCommerce was loaded: https://www.ads-software.com/support/topic/fatal-error-fixed/

    
    [10-Dec-2020 02:02:36 UTC] PHP Fatal error:  Uncaught Error: Class 'WC_Logger' not found in /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php:38
    Stack trace:
    #0 /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php(107): woo_feed_get_logger()
    #1 /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php(129): woo_feed_log('woo-feed-fatal-...', 'Uncaught Error:...', 'critical', NULL, true, true)
    #2 /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php(54): woo_feed_log_fatal_error('Uncaught Error:...')
    #3 [internal function]: woo_feed_log_errors_at_shutdown()
    #4 {main}
      thrown in /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php on line 38
    

    So:
    1. Plugin tries to use WooCommerce function before it is loaded.
    2. Fatal error
    3. WooFeed catches fatal error
    4. WooFeed tries to instantiate a WooCommerce logger
    5. Fatal error

    log-helper.php:83

    if ( ( woo_feed_is_debugging_enabled() || true === $force_log ) && function_exists( 'wc_logger' ) ) {

    seems the best place to put it, since in this case $force_log will be true.

    Thread Starter Brian Henry

    (@brianhenryie)

    PHP Notice: Undefined property: stdClass::$state in /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/class-woofunnels-contact.php on line 569

    Thread Starter Brian Henry

    (@brianhenryie)

    Another one:

    PHP Notice: Undefined property: stdClass::$city in /path/to/wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/contact/class-woofunnels-contact.php on line 559

    Brian Henry

    (@brianhenryie)

    Seems the plugin was updated without updating this library!

    v2.29.21 was released in January, so presumably it’s just a matter of incorporating that update.

    https://github.com/iCalcreator/iCalcreator/

    Also, how it is included in this project is prone to cause problems – the package namespace should be prefixed so other plugins can also use the same packages.

    https://github.com/coenjacobs/mozart

    Thread Starter Brian Henry

    (@brianhenryie)

    Class ‘CTYW’ not found

Viewing 15 replies - 31 through 45 (of 61 total)