duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
145 stars 38 forks source link

Form Request causes "access denied" #465

Closed philipboomy closed 3 years ago

philipboomy commented 3 years ago

Description

When using Form Request for validation https://sc-docs.doublethree.digital/v2.3/tags#validation I am getting this error:

Illuminate\Database\QueryException SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: YES) (SQL: select count(*) as aggregate from posts where name = Philip)

Steps to reproduce

1) Create a form request validation as per https://sc-docs.doublethree.digital/v2.3/tags#validation 2) Go to checkout and on the "information" step have this {{ sc:cart:update request="CheckoutInformationRequest" redirect="/checkout/shippingmethod" }} 3) Submit form and you get the error.

Environment

Statamic 3.2.2 Pro Laravel 8.59.0 PHP 7.4.21 doublethreedigital/duplicator 1.3.4 doublethreedigital/simple-commerce 2.3.24

duncanmcclean commented 3 years ago

Can you share your validation rules?

philipboomy commented 3 years ago

That was embarrassing. I had unique on name which was of course is not possible so I removed that and its working now. The error message just confused me.

duncanmcclean commented 3 years ago

No worries!