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

Cannot save entry with address field with "Not null violation" #101

Closed
askogrand opened this issue Mar 3, 2020 · 2 comments
Closed

Cannot save entry with address field with "Not null violation" #101

askogrand opened this issue Mar 3, 2020 · 2 comments
Labels

Comments

@askogrand
Copy link

Description (screenshots, logs, ...)

image
image

Steps to reproduce

  1. Installed the craft-sprout-field plugin
  2. Added a new address field
  3. Save an entry with an address field populated

Error

Integrity constraint violation – yii\db\IntegrityException

SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "id" violates not-null constraint
DETAIL: Failing row contains (null, 1510, 1, 92, US, OR, Portland, null, 97202, null, 123 Main Street, , 2020-03-03 19:03:50, 2020-03-03 19:03:50, 64eb543a-d59f-4e4b-9a16-312b4a365772).
The SQL being executed was: INSERT INTO "ut_sprout_addresses" ("id", "elementId", "siteId", "fieldId", "countryCode", "administrativeAreaCode", "locality", "dependentLocality", "postalCode", "sortingCode", "address1", "address2", "dateCreated", "dateUpdated", "uid") VALUES (NULL, 1510, 1, 92, 'US', 'OR', 'Portland', NULL, '97202', NULL, '123 Main Street', '', '2020-03-03 19:03:50', '2020-03-03 19:03:50', '64eb543a-d59f-4e4b-9a16-312b4a365772') RETURNING "id"

Additional info

  • Craft version: 3.4.9
  • PHP version: 7.2.11
  • Database driver & version: PostgreSQL 9.6.17
  • Plugins & versions:
Plugins
Architect	2.3.2
Azure Blob Remote Volume	1.0.2
Chunked File Uploads	1.0.1
Cloner	1.1.0
Field Manager	2.1.1
Freeform	3.6.5
Neo	2.6.2
Redactor	2.6.0.1
Sift	dev-master
Sprout Fields	3.6.1
Workflow	1.4.2

Modules
verbb-base	verbb\base\Base
sprout	barrelstrength\sproutbase\SproutBase
sprout-base-fields	barrelstrength\sproutbasefields\SproutBaseFields

web.log

@askogrand askogrand changed the title Cannot save entry with address field with `id Cannot save entry with address field with "Not null violation" Mar 3, 2020
@BenParizek
Copy link
Member

Thanks @askogrand. I can recreate using postgres. I'll update this thread when we have a fix.

BenParizek added a commit to barrelstrength/sprout-base-fields that referenced this issue Mar 20, 2020
@BenParizek
Copy link
Member

@askogrand This is resolved in the v3.6.2 release.

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