• Resolved robsarna

    (@robsarna)


    Hi,

    When working with WPML / Woocommerce I am getting a fatal error when attempting to translate some of my products.

    Without debug mode on, i get a 500 error.

    With debug turned on, the error is:

    Fatal error: Uncaught Error: Call to a member function get_cart() on null in /wp-content/plugins/minmax-quantity-for-woocommerce/main.php:689 Stack trace: #0 /wp-content/plugins/minmax-quantity-for-woocommerce/includes/addons/set_input_limitation.php(64): BeRocket_MM_Quantity->new_calculate_total(NULL, Array, 'check_product_v...', 1332, 1333) #1 /wp-content/plugins/minmax-quantity-for-woocommerce/includes/addons/set_input_limitation.php(19): BeRocket_MM_Quantity_input_limitations->get_input_data_for_product(Array, Object(WC_Product_Variation)) #2 /wp-includes/class-wp-hook.php(286): BeRocket_MM_Quantity_input_limitations->woocommerce_available_variation(Array, Object(WC_Product_Variable), Object(WC_Product_Variation)) #3 /wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array) #4 /Users/robsarna/Dropbox/websites/bmw in /wp-content/plugins/minmax-quantity-for-woocommerce/main.php on line 689

    Any help would be appreciated.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi,

    Thank you for the message.

    We will check it asap.

    Regards,
    Dima

    Thread Starter robsarna

    (@robsarna)

    Hi @dholovnia – Any luck with this?

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi,

    No luck as for now. We will update this thread when issue will be found or more info needed.

    Regards,
    Dima

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi,

    Could you please describe your actions before the error was shown?

    We are trying to reproduce the issue using this plugin and WPML and no still luck to see it.

    Regards,
    Dima

    Thread Starter robsarna

    (@robsarna)

    Hi Dima,

    Do you have Woocommerce Multilingual plugin installed from WPML?

    If so, I goto products – click the ‘translate woocommerce products’ button. Then when clicking on some of the products in other languages, it throws up the error.

    For some reason, some of the products are ok, others have the error. Here is the most recent error in case it helps:

    Fatal error: Uncaught Error: Call to a member function get_cart() on null in /wp-content/plugins/minmax-quantity-for-woocommerce/main.php:698 Stack trace: #0 /wp-content/plugins/minmax-quantity-for-woocommerce/includes/addons/set_input_limitation.php(64): BeRocket_MM_Quantity->new_calculate_total(NULL, Array, 'check_product_v...', 1332, 1333) #1 /wp-content/plugins/minmax-quantity-for-woocommerce/includes/addons/set_input_limitation.php(19): BeRocket_MM_Quantity_input_limitations->get_input_data_for_product(Array, Object(WC_Product_Variation)) #2 /wp-includes/class-wp-hook.php(286): BeRocket_MM_Quantity_input_limitations->woocommerce_available_variation(Array, Object(WC_Product_Variable), Object(WC_Product_Variation)) #3 /wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array) #4 in /wp-content/plugins/minmax-quantity-for-woocommerce/main.php on line 698

    Thanks again

    Rob

    • This reply was modified 5 years, 11 months ago by robsarna. Reason: removed relative error paths
    Thread Starter robsarna

    (@robsarna)

    Hi Dima @dholovnia,

    Not sure if this helps, but this seems to be related to the WPML translation edito r(https://wpml.org/documentation/translating-your-contents/using-the-translation-editor/), and only seems to break on variable products (simple products are fine).

    When you use the it has the above error, when you translate on the normal page it seems fine.

    Hope that helps you to debug!

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi Rob,

    Please open plugin settings page, tab Addons, turn off addon and save.

    Try again. Is the error still there?

    Regards,
    Dima

    Thread Starter robsarna

    (@robsarna)

    Hi Dima,

    That has fixed it!

    Thanks so much!

    Rob

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal Error’ is closed to new replies.