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

Too short first_name and last_name fields #321

Closed
boobaa opened this issue Jan 17, 2020 · 1 comment · Fixed by #325
Closed

Too short first_name and last_name fields #321

boobaa opened this issue Jan 17, 2020 · 1 comment · Fixed by #325
Assignees
Labels
bug Something isn't working
Milestone

Comments

@boobaa
Copy link
Contributor

boobaa commented Jan 17, 2020

Describe the bug
Cannot create a user in Drupal with a first_name and/or last_name longer than 32 chars.

To Reproduce
Steps to reproduce the behavior:

  1. Register a new user on Drupal with a First name and/or Last name longer than 32 characters.
  2. Or create such a user in Apigee Edge UI and synchronize the developers.
  3. See error:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(32): INSERT INTO users_field_data (uid, langcode, preferred_langcode, preferred_admin_langcode, name, pass, mail, timezone, status, created, changed, access, login, init, default_langcode, first_name, last_name) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16); Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->saveToSharedTables() (line 1048 of /data/apigee/devportal-int-2019.10.22/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Expected behavior
Registration and developer sync between Drupal and Apigee Edge should happen without this error. The first_name and last_name fields should be at least as long as they are in Apigee Edge.

Additional context
The bug is in apigee_edge.module's hook_entity_base_field_info(): https://github.com/apigee/apigee-edge-drupal/blob/8.x-1.x/apigee_edge.module#L251
Most probably a hook_update_N() is also needed in order to make this field longer on already-existing sites.

Version Info
drupal/core: 8.8.1
drupal/apigee_edge: 1.4.0

@boobaa boobaa added the bug Something isn't working label Jan 17, 2020
@arunz6161
Copy link
Collaborator

arunz6161 commented Jan 21, 2020

Thanks @boobaa for the detailed explanation and providing additional context. We will take a look at this issue shortly.

shadcn added a commit to shadcn/apigee-edge-drupal that referenced this issue Jan 29, 2020
shadcn added a commit to shadcn/apigee-edge-drupal that referenced this issue Jan 29, 2020
shadcn added a commit to shadcn/apigee-edge-drupal that referenced this issue Jan 29, 2020
shadcn added a commit to shadcn/apigee-edge-drupal that referenced this issue Jan 29, 2020
shadcn added a commit to shadcn/apigee-edge-drupal that referenced this issue Jan 30, 2020
shadcn added a commit to shadcn/apigee-edge-drupal that referenced this issue Jan 30, 2020
shadcn added a commit that referenced this issue Jan 30, 2020
[#321] Increase max_length for first_name and last_name fields
@cnovak cnovak added this to the 8.x-1.6 milestone Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants