- πΊπΈUnited States DamienMcKenna NH, USA
Is there anything still needed for this, now that β¨ Improve support for multi-value schema using Metatag's custom separator option Fixed has been committed?
- π©πͺGermany J-Lee π©πͺπͺπΊ
The problem persists with Metatag 2.0 and Schema Metatag 3.0.1
- πΊπΈUnited States DamienMcKenna NH, USA
Thanks for confirming it.
This needs to be rerolled.
- π©πͺGermany J-Lee π©πͺπͺπΊ
We have a WYSIWYG editor (v5) text field containing a text with multiple breaks (br tag). The text is then split in the schema at the br-tags and for each br-tag a text property is inserted.
- π©πͺGermany J-Lee π©πͺπͺπΊ
It looks like this, that even with commas in the text the property is split up
- π©πͺGermany J-Lee π©πͺπͺπΊ
I have to revise my statement. It is only commas and not br tags. Sorry for the disturbance.
- last update
over 1 year ago Patch Failed to Apply - π©πͺGermany J-Lee π©πͺπͺπΊ
I'm not sure I understand it correctly.
But shouldn't the text property also appear in
Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase::neverExplode()
? And then wouldn't the order of the$explode
query inDrupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase::::processItem()
have to be adjusted and checked first forneverExplode()
and then forhasSeparator
?if ($key === 0) { $explode = $this->multiple(); } elseif ($this->schemaMetatagManager->hasSeparator()) { $explode = TRUE; } else { $explode = !in_array($key, $this->neverExplode()); }
becomes
if ($key === 0) { $explode = $this->multiple(); } elseif (!in_array($key, $this->neverExplode()) { $explode = TRUE; } else { $explode = $this->schemaMetatagManager->hasSeparator(); }
- π©πͺGermany J-Lee π©πͺπͺπΊ
I am not sure about the type "text". Is it allowed to use it multiple times somewhere?
A quick test with adding "text" to neverExplode() and with the following ruleset at
Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase::processItem()
fixes the problem:switch (true) { case $key === 0: $explode = $this->multiple(); break; case in_array($key, $this->neverExplode()): $explode = FALSE; break; case !in_array($key, $this->neverExplode()): $explode = TRUE; break; case $this->schemaMetatagManager->hasSeparator(): $explode = TRUE; break; default: $explode = FALSE; }
- πΊπΈUnited States DamienMcKenna NH, USA
Out of interest, if you change the Metatag module's delimiter from a comma to something else, does this problem go away?
- π©πͺGermany J-Lee π©πͺπͺπΊ
I have missed this configuration :(
If I set it to something else, the issue is fixed. - Status changed to Closed: duplicate
over 1 year ago 9:07am 14 August 2023