The max length of the video embed field is set at 256 and is not customizable based on field base. Is there a reason this is necessary? It makes it not possible to add a custom provider to handle input that for instance may need a long query string or intends to accept actual iframe embed code.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anthonysimone created an issue. See original summary.

Sam152’s picture

I don't see a reason why this shouldn't just be bigger. Not sure there'll be much of a performance penalty. What size would you suggest?

gregnz’s picture

Section 3.2.1 of http://www.faqs.org/rfcs/rfc2616.html suggests it should be configurable to allow users to set the length to handle the expected content.

Referencing https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of... this patch sets the max length to 2048 chars which will handle most real world cases without being configurable.

xurizaemon’s picture

Title: Make max length of field customizable » Increase length of URL field to reflect HTTP spec on URL size

Updating title - we're not making it customizable, we're increasing it to allow for what's commonly supported.

xurizaemon’s picture

Title: Increase length of URL field to reflect HTTP spec on URL size » Increase length of URL field to 2048 chars
RoSk0’s picture

Version: 8.x-1.4 » 8.x-1.x-dev
Category: Feature request » Task
Status: Active » Needs work

I'm fine with setting it to that size. However we need couple things done here as well: 1) issue summary 2) upgrade path

xurizaemon’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev

Based on secret knowledge, I think Greg's patch is being submitted to 8.x-2.x branch not 8.x-1.x.

RichardDavies’s picture

After applying this patch, I get the following error in my status report:

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.

Media

  • The media.field_media_video_embed_field field needs to be updated.

How do I resolve that error now that Drupal 8.7 has removed support for drush entup?

Sam152’s picture

Status: Needs work » Closed (works as designed)

Without an upgrade path, using this patch would require all the fields to be deleted and the module be installed and reinstalled. I think at this stage, it's probably too disruptive to consider.

RichardDavies’s picture

Status: Closed (works as designed) » Needs work

Hmm, thanks for the response, but this issue shouldn't be closed just because the patch was incomplete. This is still very much an issue that I would like to be resolved. If I understand correctly, the patch just needs to include an update function to update any existing fields as described in https://www.drupal.org/node/3034742.

Sam152’s picture

Status: Needs work » Closed (won't fix)

There is no current supported way to update field level schema. At this stage I would consider an unsupported upgrade path way too risky for the other 62,000 installs that don't require this issue. Feel free to write and share patches for this, but I think it's a stretch to put that level of disruption on sites, for a module that is slowly becoming defunct.