Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
byron-roots opened this issue May 31, 2024 · 5 comments · Fixed by #1087
Closed

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

byron-roots opened this issue May 31, 2024 · 5 comments · Fixed by #1087
Labels

Comments

@byron-roots
Copy link

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 statamic/eloquent-driver#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

Copy link

Released as part of v7.2.1.

@de-raaf-media
Copy link

May be related? In version 7.4.1 I noticed that my order proces no longer works. Do you want to reopen this issue or should I create a new issue for this?

The error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'roles' in 'field list'
update
  `users`
SET
  `roles` = [ ],
  `GROUPS` = [ ],
  `users`.`updated_at` = 2024 -08 -21 14: 53: 58
WHERE
  `id` = 2

@duncanmcclean duncanmcclean reopened this Aug 21, 2024
@duncanmcclean
Copy link
Owner

I'll take a look when I can.

Copy link

Released as part of v7.4.5.

@de-raaf-media
Copy link

Released as part of v7.4.5.

Thanks @duncanmcclean!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants