Long field names which are shortened by Drupal doesn't work.

Created on 2 September 2020, almost 4 years ago
Updated 24 January 2024, 5 months ago

Problem/Motivation

For fields that have really long names, you get this error:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal8.field_collection_item__field_test_a_really_long_text_f' doesn't exist: SELECT t.* FROM {field_collection_item__field_test_a_really_long_text_f} t; Array ( ) in Drupal\security_review\Checks\Field->run() (line 86 of /app/web/modules/contrib/security_review/src/Checks/Field.php).

Steps to reproduce

  1. Install Field collection module.
  2. Create a field collection field for any content type.
  3. Under that field collection field, create a Long text field with a very long field name.
  4. Run the "Content" check.

Proposed resolution

Attached patch.

Remaining tasks

Test coverage?

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡΅πŸ‡­Philippines dsdeiz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024