Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Forum

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Fatal Error 18 Jun 2016 13:26 #1

  • gutbetucht
  • gutbetucht's Avatar Topic Author
Hello,

I've got a special fatal error, sometimes it appears sometimes not.
It appears on the checkout page:
Fatal error: Call to a member function isNoShipping() on null in /customers/5/d/8/gut-betucht.ch/httpd.www/wp-content/plugins/woocommerce-advanced-shipping-by-rules/library/rules_shipping_framework.php on line 433

If I check line 433 and can't really figure out, where the problem could be. But I'm also not a programmer.
protected function handleNoShipping($match, $method) {
		if ($match['rule']->isNoShipping()) {
			if (!empty($match["rule_name"]))
				$this->warning('OTSHIPMENT_RULES_NOSHIPPING_MESSAGE', $match["rule_name"]);
			$name = $this->getMethodName($method);
			$this->debug('checkConditions '.$name.' indicates NoShipping for this method, specified by rule "'.$match["rule_name"].'" ('.$match['rule']->rulestring.').');
			return true;
		} else {
			return false;
		}
	}

I'm using Wordpress 4.5.2. and the Server Settings are:
Server Environment
Server Info: Apache
PHP Version: 5.6.22
ABSPATH: /customers/5/d/8/gut-betucht.ch/httpd.www/
PHP Memory Limit: 256 MB
PHP Post Max Size: 96 MB
PHP Time Limit: 50
PHP Max Input Vars: 5000
PHP Display Errors: ✔
SUHOSIN Installed: –
MySQL Version: 5.5.48
Max Upload Size: 96 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔

Thanks for your help.
Lukas

Fatal Error 24 Jun 2016 23:23 #2

Dear gutbetucht,
You are the second user to run into this error. Unfortunately, so far I haven't been able to track down the issue...
I suppose you are using the latest version of WC?

Which other plugins do you have installed?
The other user that ran into the problem had the Multiple Shipping plugin installed, which was my guess to cause some kind of incompatibility with our plugin, but we were never able to reproduce or track down the issue.

Can you maybe enable debug messages to get the full backtrace in the web server log. This should give an indication about the code path that causes the issue. With that other user, the relevant parts of the backtrace were:
[24-Mar-2016 09:59:43 UTC] PHP  13. WC_MS_Checkout->calculate_totals() C:\wordpress\migyston\wp-includes\plugin.php:525
[24-Mar-2016 09:59:43 UTC] PHP  14. WC_Shipping->calculate_shipping() C:\wordpress\migyston\wp-content\plugins\woocommerce-shipping-multiple-addresses\includes\wcms-checkout.php:445
[24-Mar-2016 09:59:43 UTC] PHP  15. WC_Shipping->calculate_shipping_for_package() C:\wordpress\migyston\wp-content\plugins\woocommerce\includes\class-wc-shipping.php:276
[24-Mar-2016 09:59:43 UTC] PHP  16. Shipping_by_Rules->calculate_shipping() C:\wordpress\migyston\wp-content\plugins\woocommerce\includes\class-wc-shipping.php:359
[24-Mar-2016 09:59:43 UTC] PHP  17. RulesShippingFramework->getCosts() C:\wordpress\migyston\wp-content\plugins\shipping-by-rules-for-woocommerce\includes\rules-shipping-method.php:149
[24-Mar-2016 09:59:43 UTC] PHP  18. RulesShippingFramework->handleNoShipping() C:\wordpress\migyston\wp-content\plugins\shipping-by-rules-for-woocommerce\library\rules_shipping_framework.php:480

Best regards,
Reinhold

Fatal Error 24 Jun 2016 23:39 #3

  • gutbetucht
  • gutbetucht's Avatar Topic Author
Hello Reinhold,

no we weren't using the newest version of woocommerce at that point (still on 2.5.5.), now we updated on 2.6.2.

The problem frequently appeared when we were using the "WooCommerce Conditional Shipping and Payments" plugin, to limit a maximum amount for certain gateways, but in the end removed this plugin and the gateway we had problems with.

Now the error only appears very rarely, I once experienced it after removing the plugin, but by refreshing the site and removing the browser cache everything worked, but also a customer had this error and I'm not sure if there are more customers as well, that we never heard of.

But now when it's this rare I think I can't provoke the error on purpose and run the debug messages.

Best regards
Lukas

Fatal Error 30 Jun 2016 22:46 #4

  • gutbetucht
  • gutbetucht's Avatar Topic Author
Hello Reinhold,

it's me again, sorry to bug you again.
But we had another customer yesterday complaining that this fatal error message appeared.

Do you have any idea how to solve this? Because I don't know how to provoke this error message.

Lukas

Fatal Error 01 Jul 2016 01:27 #5

Dear Lukas,
Sorry to hear that the issue persists (not surprising, though).
As I said, we have been unable to reproduce the issue in any of our test systems and test rulesets. We only know of that one other customer who runs into the same issue, but could also not provide a way to reproduce the issue. So, let's find out what you two have in common, so we have a starting point.
Could you please be so kind and send us (either by posting here or via e-mail to office@open-tools.net)
  • your complete ruleset(s) of the shipping by rules methods that you have set up
  • the full WooCommerce system status (WordPress backend => WooCommerce => System Status => Click "Get System Report" => Click "Copy for Support" and then paste it either in the mail or in a posting here)

If you could get a backtrace of the error in the webserver's log file that might also help pinpointing where the issue lies.

Best regards and sorry that I can't be of more help for now,
Reinhold

Fatal Error 01 Jul 2016 09:44 #6

  • gutbetucht
  • gutbetucht's Avatar Topic Author
I just sent you an email. Thanks again!

Fatal Error 12 Jul 2016 02:32 #7

Dear Lukas,
Thank you very much for the information. While I am still not able to reproduce the issue, I have found a race condition in the code, which would lead to the very error you are experiencing. However, I still don't know when this condition is triggered.

I have updated the plugin and released a fix in version 1.2.3.

Please let me know whether this fixes the issue for good.

Best regards,
Reinhold
  • Page:
  • 1