Problem/Motivation

We're using the module to externalize review data for doctors. As such, we need to support names such as "Real Doctor, M.D.". The problem is that the comma is interpreted as a multivalue, and thus split, causing a validation failure with the schema.org JSON-LD output.

Steps to reproduce

  1. Configure a schema.org review metatag for a content type.
  2. Use [node:title] or [current-page:title] for the name of the review.
  3. Create a node with a comma in the title.

Proposed resolution

The name field should be added to \Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase::neverExplode(). Or, the explode function should be configurable.

Remaining tasks

Create patch.

User interface changes

Depends on approach.

API changes

Depends on approach.

Data model changes

Depends on approach.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

socketwench created an issue. See original summary.

damienmckenna’s picture

Version: 8.x-2.4 » 3.0.x-dev
Status: Active » Needs review

damienmckenna’s picture

Status: Needs review » Fixed
Parent issue: » #3367955: Plan for Schema Metatag 3.0.1

Committed. Thank you.

Status: Fixed » Closed (fixed)

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

nkasprak’s picture

Is there a way to provide more flexibility here? My site has many pages with multiple authors and my setup relied on the names being exploded (in conjunction w/ the pivot functionality), and this change broke it. Maybe there's a better way but it seems like in general there are legit cases where you'd want multivalue here.