duncanmcclean / simple-commerce

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

Roles and Groups added to update query when updating customers via cart #1083

Closed byron-roots closed 1 month ago

byron-roots commented 1 month ago

Description

When trying to create customers or update customers via the cart, the SQL query is trying to add roles and groups, which don't exist on the user table. Adding role and user columns then provides a different error saying 'The database connection does not support escaping arrays'

https://flareapp.io/share/67OXJ2v5

Screenshot 2024-05-31 at 11 47 03

This is on the same site from https://github.com/statamic/eloquent-driver/issues/291

Steps to reproduce

  1. Add customer data fields to {{ sc:cart:update }} form or {{ sc:cart:addItem }}
  2. Submit form

Environment

Environment Application Name: Newby Leisure Laravel Version: 10.48.12 PHP Version: 8.2.19 Composer Version: 2.7.6 Environment: local Debug Mode: ENABLED URL: newbyleisure.test/ Maintenance Mode: OFF

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

Drivers Broadcasting: pusher Cache: redis Database: mysql Logs: stack / single Mail: smtp Queue: redis Session: file

Locales Installed Locales Version: 1.9.0 Protected

Localization Installed: en, es LaravelLang\Attributes\Plugin: 2.10.6 LaravelLang\HttpStatuses\Plugin: 3.8.3 LaravelLang\Lang\Plugin: 13.12.0 Protected Locales: en Publisher Version: 14.7.1

Simple Commerce Currencies: GBP, EUR Gateways: Stripe, Invoice Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\UserCustomerRepository Repository: Order: App\Repositories\EloquentEntryOrderRepository Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository Shipping Methods: Free Shipping Tax Engine: DuncanMcClean\SimpleCommerce\Tax\BasicTaxEngine

Livewire Livewire: v3.5.0

Statamic Addons: 15 Sites: 2 (English,, Spanish) Stache Watcher: Disabled Static Caching: Disabled Version: 5.6.2 PRO

Statamic Addons appswithlove/statamic-one-click-content-translation: 5.2.1 duncanmcclean/simple-commerce: 7.2.0 jacksleight/statamic-bard-texstyle: 3.2.2 jonassiewertsen/statamic-livewire: 3.3.1 markkravchuk/statamic-activity-book: 1.0.1 nineteensquared/instagram: 1.2.0 rootstudio/cache-primer: 0.12 rootstudio/monitor: 0.3 rootstudio/mux-video: 0.6 rootstudio/turnstile: 0.3 statamic-rad-pack/meilisearch: 3.3.0 statamic-rad-pack/runway: 7.1.0 statamic/collaboration: 1.0.0 statamic/eloquent-driver: 4.0.0 stillat/relationships: 2.2.0

Statamic Eloquent Driver Asset Containers: file Assets: eloquent Blueprints: file Collection Trees: eloquent Collections: file Entries: eloquent Forms: eloquent Global Sets: file Global Variables: eloquent Navigation Trees: eloquent Navigations: file Revisions: eloquent Taxonomies: file Terms: eloquent

github-actions[bot] commented 1 month ago

Released as part of v7.2.1.