webdna / commerce-admin-orders

Create a new commerce order from the admin
Other
9 stars 1 forks source link

Postgres syntax issue #8

Closed KatieMFritz closed 3 years ago

KatieMFritz commented 4 years ago

Steps to reproduce:

  1. Click "new order"
  2. Search for a zip code
  3. I don't think there are any customers to search from
  4. Instead of an error message, get the following error:
SQLSTATE[42601]: Syntax error: 7 ERROR: zero-length delimited identifier at or near """"
LINE 5: WHERE ((REPLACE(addresses.zipCode," ","")=$1) OR (REPLACE(ad...
^
The SQL being executed was: SELECT "orders"."id", "orders"."email", "addresses"."firstName", "addresses"."lastName", "addresses"."address1", "addresses"."city", "addresses"."zipCode", "customers"."userId"
FROM "commerce_orders" "orders"
INNER JOIN "commerce_addresses" "addresses" ON "addresses"."id" = "orders"."shippingAddressId"
INNER JOIN "commerce_customers" "customers" ON "customers"."id" = "orders"."customerId"
WHERE ((REPLACE(addresses.zipCode," ","")='48910') OR (REPLACE(addresses.zipCode," ","") LIKE '%48910%')) AND ("orders"."iscompleted"=1)
GROUP BY "orders"."email"
LIMIT 20
Error Info: Array
(
    [0] => 42601
    [1] => 7
    [2] => ERROR:  zero-length delimited identifier at or near """"
LINE 5: WHERE ((REPLACE(addresses.zipCode," ","")=$1) OR (REPLACE(ad...
                                              ^
)
mcjackson18 commented 4 years ago

@KatieMFritz, I've emailed you on the email address from your website, let me know if you haven't received it.

mcjackson18 commented 3 years ago

@KatieMFritz, I'm going to close this issue, if this is still a problem please can you create a new ticket.