Problem/Motivation

og:description should be allowed to be longer than 255 characters. Interestingly, the schema already correctly defines it as a type: text, so translations are allowed to be longer.

Proposed resolution

I guess it would be nice if the annotation could specifiy the form field type, but for now, duplicating the form definition it like the Description class for example does.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

Berdir’s picture

Status: Active » Needs review
FileSize
955 bytes
mbovan’s picture

Status: Needs review » Reviewed & tested by the community

#2 works fine.

DamienMcKenna’s picture

Wha would you think about expanding the Metatag API to indicate that certain tags were "verbose" or "long", which would then change them to a textarea instead of a text field?

mbovan’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
4.47 KB
4.85 KB

This patch introduces a new annotation attribute long which sets textarea form type depending on the value.

There might be other places in the module(s) where we have to add/document a new attribute.

I guess it would be nice if the annotation could specifiy the form field type, but for now, duplicating the form definition it like the Description class for example does.

Supporting the form field type would be quite useful, but I'm not sure if that would work for all kind of types. For instance, using select would require #options property too?

DamienMcKenna’s picture

Title: og:description should use a textarea form element » Extend meta tag definition to allow some tags to use a textarea instead of text field, e.g. og:description

Thanks for putting that together, will review it soon.

kell.mcnaughton’s picture

I applied the patch from #5 and can confirm it works.

Before

Before

After

After

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine to me as well.

DamienMcKenna’s picture

  • DamienMcKenna committed febbb95 on 8.x-1.x authored by mbovan
    Issue #3001387 by mbovan, Berdir, kell.mcnaughton, DamienMcKenna: Extend...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks all.

Status: Fixed » Closed (fixed)

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