duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/simple-commerce
Other
143 stars 34 forks source link

Object of class DuncanMcClean\SimpleCommerce\Tax\Standard\TaxCategory could not be converted to string #1057

Closed jamie-b5 closed 2 months ago

jamie-b5 commented 2 months ago

Description

Client reported a 500 error when they went to edit a product.

debug to true reports error as Object of class DuncanMcClean\SimpleCommerce\Tax\Standard\TaxCategory could not be converted to string

image

However the issue resolves itself when we clear the cache (php artisan cache:clear) but will then reappear with another product on a different day.

Steps to reproduce

Unhelpfully I can't say for certain what triggers the error, only that the client has reported around 2 or 3 over the last week and that clearing the cache resolves it (temporarily), but then the error will re-occur.

The tax category on the product was set to default FYI.

Environment

Environment Application Name: Sound Organisation Laravel Version: 10.48.7 PHP Version: 8.1.21 Composer Version: 2.4.2 Environment: production Debug Mode: ENABLED URL: soundorg.co.uk Maintenance Mode: OFF

Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED

Drivers Broadcasting: log Cache: statamic Database: mysql Logs: stack / single Mail: smtp Queue: sync Session: file

Simple Commerce Currencies: GBP Gateways: Stripe Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\EntryCustomerRepository Repository: Order: DuncanMcClean\SimpleCommerce\Orders\EntryOrderRepository Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository Shipping Methods: Free Overnight Shipping, Click and Collect Tax Engine: DuncanMcClean\SimpleCommerce\Tax\Standard\TaxEngine

Statamic Addons: 3 Antlers: runtime Sites: 1 Stache Watcher: Disabled Static Caching: half Version: 4.56.1 PRO

Statamic Addons duncanmcclean/simple-commerce: 6.1.0 jezzdk/statamic-google-maps: 1.2.2 rias/statamic-data-import: 1.3.0

duncanmcclean commented 2 months ago

Hmm, I can't seem to reproduce this myself. Let me know if you're able to figure out what's causing it and I can investigate.

jamie-b5 commented 2 months ago

Hi Duncan

it was one of those intermittent errors so understandably hard to debug.

The client has not reported any further occurrences since we updated both Simple Commerce and Statamic so I'll close this issue but if it pops up again I'll try to get more details if possible.

Thanks again.

Jamie