Problem/Motivation

If you try to add a "Content Item" widget with a "Piece of content" referring to a node with a title longer than 128 characters, you'll get the following validation errors:

exposed cannot be longer than 128 characters but is currently 161 characters long.

title cannot be longer than 128 characters but is currently 161 characters long.

Steps to reproduce

  1. Add a Content Item widget
  2. Try to load a node content item with a longer title (longer than 128 characters)
  3. Notice that you can't save the widget due to the error

Proposed resolution

There's an upstream patch that seems to have the right idea: #1973580: Term reference filter autocomplete ('is one of', 'is none of') has a maximum length of 128 characters

However, it doesn't seem super likely that it'll be merged (that issue is already 8 years old, and the patch is 2 years old). We can use a form alter to fix it in panopoly_widgets.

Remaining tasks

  1. Write patch
  2. Review
  3. Merge!

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new1.47 KB

Patch is attached, which fixes this in my testing!

cboyden’s picture

Here's a module-only reroll of the patch for anyone using panopoly_widgets outside the full Panopoly distribution.

cboyden’s picture

Here's a patch for testing this update.

cboyden’s picture

StatusFileSize
new1.97 KB

Updated test patch to fix missing step.

Edited to add: Tests are generally passing, see https://travis-ci.org/github/cboyden/panopoly/builds/770833373

dsnopek’s picture

Looks like the patch wasn't working in all situations. Here's a new version!

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

This is working fine on our child distribution.

  • dsnopek committed 5b485ba on 7.x-1.x
    Issue #3213290 by cboyden, dsnopek: "Content item" widget gives...
dsnopek’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed :-)

Status: Fixed » Closed (fixed)

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