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

PDOException when setting unique email required on sprout email field #113

Open
csgrant83 opened this issue Jul 3, 2020 · 0 comments
Open
Labels

Comments

@csgrant83
Copy link

csgrant83 commented Jul 3, 2020

Description (screenshots, logs, ...)

Hey, I am adding a sprout email field to a matrix and I am getting what looks like a PDO error when required the email address to be unique.
Database Exception – yii\db\Exception SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ""
LINE 3: ...elements"."id" = "matrixcontent_contactlocations".elementId... ^ The SQL being executed was: SELECT "field_location_locationSecondaryEmail" FROM "matrixcontent_contactlocations" INNER JOIN "elements" "elements" ON "elements"."id" = "matrixcontent_contactlocations".elementId WHERE ("field_location_locationSecondaryEmail"='[email protected]') AND ("elements"."draftId" IS NULL) AND ("elements"."revisionId" IS NULL) AND ("elements"."dateDeleted" IS NULL) AND ("elementId"<>21706) LIMIT 1 Error Info: Array ( [0] => 42601 [1] => 7 [2] => ERROR: syntax error at or near ""
LINE 3: ...elements"."id" = "matrixcontent_contactlocations".elementId... ^ ) ↵ Caused by: PDOException SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ""
LINE 3: ...elements"."id" = "matrixcontent_contactlocations".elementId... ^

Steps to reproduce

  1. Create a matrix field.
  2. Add a sprout email field as matrix block type field with unique address required.
  3. Add matrix to a single
  4. Enter an email into the matrix field from singles entry section
  5. Press save and you get an error.

Additional info

  • Craft version: Craft CMS 3.4.26 (Pro)
  • PHP version: 7.2.24
  • Database driver & version: PostgreSQL 10.12
  • Plugins & versions:
    • Cloner 1.1.2
    • CP Field Inspect 1.1.3
    • Craft Commerce 3.1.10
    • Default Dashboard 1.0.8
    • Elements Panel 1.1.0
    • Feed Me 4.2.3
    • Field Manager 2.1.6
    • Forms 3.7.0
    • Google Cloud Storage 1.4.0
    • ImageOptimize 1.6.14
    • Incognito Field 1.1.1.1
    • Navigation 1.3.21
    • Redactor 2.6.1
    • SEO 3.3.8
    • Sprout Fields 3.8.3
    • Super Table 2.5.1
    • Typed link field 1.0.23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants