nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
162 stars 68 forks source link

'Summary from field' on a Matrix field adding whitespace and HTML spaces around the generated text #1484

Closed we-work-nights closed 1 week ago

we-work-nights commented 1 week ago

I am trying to generate a meta description from a field which uses a Matrix field made up of multiple text boxes. The text is correctly displayed, however, extra text spaces are appearing around the text, making the meta description look a bit odd. I have also tried to

I have set SEO Description Source to override. I have selected Summary From Field to use the required Matrix field.

Screenshot 2024-06-25 at 08 32 38 Screenshot 2024-06-25 at 08 28 57

Versions Plugin version: SEOmatic 5.0.4 Craft version: Craft Pro 4.7.4

khalwat commented 1 week ago

First, generally this is something I would set up via Content SEO. The SEO Settings field is generally meant to be a per-entry override, and usually doesn't need to be used.

Instead set up the Content SEO for this section to map the SEO Description Source to what you're doing in the SEO Settings field.

As for the additional spaces, I'm not sure exactly where those are coming from. Are we sure they are not present in the original content, but are just invisible due to the way HTML is rendered?