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
166 stars 71 forks source link

Seo Title Source: "From Title" fetches wrong Title #966

Closed lenvanessen closed 3 years ago

lenvanessen commented 3 years ago

Describe the bug

I'm trying to trace this into the code a bit further to give a try and give a bit more insight into what's going on here. But in our installation, setting the SEO Title Source to "from Title field" will return a different title, in our case, it usuallly rotates two or three different titles to choose from, none of them the actual title of the entry.

You can see in the screenshot: Entry Title: Valorant Artisan Skin Collection SEO title: Die Top 10 der bestwerteten Spier in FIFA 20 | EarlyGame

Schermafbeelding 2021-09-03 om 10 14 11

It's not just the preview, the actual SEO title is set to this value as well.

To reproduce

Steps to reproduce the behaviour:

  1. Create a new entry
  2. Set SEO title field to "title"
  3. Save

Versions

khalwat commented 3 years ago

I'm assuming this is a multi-site setup. Is there any rhyme or reason to the what titles is chosen? Are they different titles for the same entry (from different sites) or just randomly different titles?

lenvanessen commented 3 years ago

Yes, it's a multi-site set-up. The entries are not propagated to the different sites though. no rhyme or reasons, they are from the same site, and usually from the same 3 entries.

khalwat commented 3 years ago

So Content SEO pulls from the title, and the SEO Settings field is set to not override. Got it

khalwat commented 3 years ago

I'm unable to reproduce this by going to a section, and creating multiple new entries in that section. They are all named as expected.

How are the titles for your articles determined for this section? Just a title field where people enter text?

Is there any Twig code that could be altering things in SEOmatic?

Something isn't adding up here...

khalwat commented 3 years ago

This ended up being hard-coded Twig code that was entered into the Content SEO settings.