Thread tagged as: Problem, Error, Shop

Perch Shop cart was working yesterday, now Fatal Error

Hi, I had a working cart yesterday and now when I navigate to the cart page I get a Fatal Error message:

Fatal error: Uncaught Error: Call to a member function groupTaxRate() on boolean in /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Product.class.php:384 Stack trace: #0 /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Cart.class.php(723): PerchShop_Product->get_prices(19, 'standard', 'exc', Object(PerchShop_TaxLocation), Object(PerchShop_TaxLocation), Object(PerchShop_Currency), Object(PerchShop_CartTotaliser), true) #1 /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Cart.class.php(244): PerchShop_Cart->calculate_cart() #2 /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Cart.class.php(123): PerchShop_Cart->recalculate_summary_data() #3 /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Runtime.class.php(205): PerchShop_Cart->add_to_cart('16', 1) #4 /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/runtime/forms in /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Product.class.php on line 384

Worryingly, I tried to restore a database backup (I set up Dropbox backups) and got an error message saying that the most recent backup can't be restored. My diagnostics are all green. I don't have anything in my PHP error log.

I did make some minor template changes before things broke, but I backed out of them and put the old template back and it didn't fix anything.

If it helps, here's the example product detail page on the development server:

When you click either of the item sizes (submit buttons) they should take you to the cart, but you'll hit the Fatal Error instead. I have debug turned on, you can see it if you scroll to the bottom (of the pages that load).

Lindsay Masten

Lindsay Masten 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do the products have a tax group set?

Hi Drew, yes they do. Here are screenshots showing the tax setup:

screenshot 1

screenshot 1

screenshot 1

Update: this is fixed. I don't know what happened, but the error went away on its own. Thank you for your help!

I'm starting to suspect my host—is there anything you can think that I should ask them?