Updated: Comment #0

I'm aware that it was me who just recently introduced this, but yeah. Sorry...
There was a lot of copy-pasting involved in that issue, apparently a little bit too much...

Problem/Motivation

StringLong specifies a default value for a 'text' schema type.
'text' schema types do not support specifying a default value.

Proposed resolution

Remove the default value from the schema.

I also removed the 'not null'. Both 'not null' and 'default' are terribly inconsistent right now in core, especially between field items and hook_schema(). I'll open an issue for that.

CommentFileSizeAuthor
string-long-schema-broken.patch600 byteststoeckler
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler’s picture

Priority: Normal » Critical

This now blocks #2183231: Make ContentEntityDatabaseStorage generate static database schemas for content entities, which is a beta blocker, so marking as critical.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

This matches existing big texts in core, although some of them explicitly have not null FALSE but that's the default.

The other issue will provide test coverage, would also have been possible to just fix it there I guess, another two lines like this wouldn't have mattered much :)

catch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

  • Commit 626369a on 8.x by catch:
    Issue #2227367 by tstoeckler: StringLong's schema is broken.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.