Increase max length of FAQPage - AcceptedAnswer textfield.

Created on 4 March 2024, over 1 year ago

Problem/Motivation

Is it possible to increase the maxlength value for FAQPage AcceptedAnwser? I've read that you should use tokens to fill the field, but the question and answer is - in my case - a part of the larger body field. There's no official charachter limit for it, so I don't get the restriction.

Proposed resolution

Change from textfield to textarea, similar to https://www.drupal.org/project/schema_metatag/issues/3424050 📌 Increase max length of SameAs field. Needs review

Feature request
Status

Active

Version

3.0

Component

Miscellaneous

Created by

🇧🇪Belgium fbreckx Antwerp

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

Comments & Activities

  • Issue created by @fbreckx
  • 🇮🇳India ssaba

    Here, I have tried this patch for the version 2.5.

  • 🇪🇸Spain stadoom

    Our customer requires to set several Questions and Answers into the metatag using the Pivot option, so it is better not to limit these fields maxLength and change the field type to textfield.

    Here is the patch for 3.0 version.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    62 pass
  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States damienmckenna NH, USA

    This is the wrong approach - the parent PropertyTypeBase class shouldn't know about individual tags.

  • 🇳🇱Netherlands daluxz

    The patches in this issue didn't work for me.

    We are using the FaqPage Questions and Answers with quite long tokens like:
    - [node:field_paragraphs:entity:field_node_faq:0:entity:title];[node:field_paragraphs:entity:field_node_faq:1:entity:title];[node:field_paragraphs:entity:field_node_faq:2:entity:title];[node:field_paragraphs:entity:field_node_faq:3:entity:title]
    - [node:field_paragraphs:entity:field_node_faq:0:entity:field_text_long_answer];[node:field_paragraphs:entity:field_node_faq:1:entity:field_text_long_answer];[node:field_paragraphs:entity:field_node_faq:2:entity:field_text_long_answer];[node:field_paragraphs:entity:field_node_faq:3:entity:field_text_long_answer]
    So these fields run out of space very quickly.

    I created a new patch in which a new parameter ("long") is added. Whenever a plugin uses this parameter, a textarea is used instead of a textfield, and the maxlength is removed in that case.

    See the attached patch.

  • Status changed to Needs review 2 days ago
Production build 0.71.5 2024