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
165 stars 69 forks source link

Default SEO Image Source is not rendered #1475

Open samuel-clara opened 4 months ago

samuel-clara commented 4 months ago

Describe the bug

When setting a SEO Image Source under "Content SEO" → "SEO Image Source" with "From Asset Field" this is not rendered either in the CP preview nor in the html code. When overwriting this though the entry SEOMatic filed it works properly. I tried to remove the cache.

Screenshots

beta hotelrecort it_cms_entries_eatDrink_343-eat-drink_site=it(6 Lplus a macBook - Safari Viewport) beta hotelrecort it_cms_entries_eatDrink_343-eat-drink_site=it(6 Lplus a macBook - Safari Viewport) (1)

Versions

khalwat commented 4 months ago

Please show me the screenshot of your Content SEO settings and the accompanying preview?

samuel-clara commented 4 months ago

meteorit 2024-05-31 at 09 27 37@2x meteorit 2024-05-31 at 09 27 46@2x

joelstrom commented 3 months ago

We are currently facing a very similar issue except that it's for the description. In the entry it's always showing as "title" although the content fallback has been set to description:

Screenshot 2024-06-04 at 14 49 52 Screenshot 2024-06-04 at 14 50 48

Tried updating the plugin to the newest version, resaving the entries section, changing the content defaults to other settings but with no luck. Manual override works in this case too, just as manuel-clara mentioned in this report.

SEOmatic version: 4.0.49 Craft CMS version: 4.8.3

khalwat commented 3 months ago

Do you have multiple sites and/or multiple entry types? SEOmatic stores its settings on a per-site, per-entry type basis.

Can you confirm the settings are what they should be for each site/entry type combo?

samuel-clara commented 3 months ago

Yes I have multiple sites but not multiple entry types. Yes I confirm that the settings are what they should be for each site combo. As you can see all my screenshots are all from the same site.

khalwat commented 3 months ago

Okay I've attempted to replicate this, but have been unable to. Perhaps you can tell me what might be different in how I have configured things.

Here's my "Blog" Content SEO Settings that map the SEO Description to the "Plain Text" field, and the SEO Image to the "Some Asset" field:

Screenshot 2024-06-05 at 8 39 58 PM

And it seems to work as expected:

Screenshot 2024-06-05 at 8 42 05 PM

...as do the overrides:

Screenshot 2024-06-05 at 8 42 42 PM
khalwat commented 3 months ago

Note @joelstrom that what you see in the preview on the right is actually the Twitter and FaceBook previews... which have settings that are set in separate tabs in the Content SEO settings.

samuel-clara commented 3 months ago

I could not find out why this is happening on my side. I realised that it's happens not to all entries. The only way I could solve it is by specifying an Image source for Facebook and X under content SEO.

khalwat commented 3 months ago

I'm on vacation at the moment, but I'd be happy to continue looking into this. But I need to be able to reproduce it... so we probably should get on a conference all, or, if you'd be able to share your composer.json and database dump, I could try spinning it up locally.

samuel-clara commented 3 months ago

Thank you! I will send you all per e-mail.

jan-dh commented 3 months ago

To chime in, we're running against the same issue:

khalwat commented 3 months ago

I would love to fix whatever the issue is here, but unless I can reproduce it, it'll be pretty difficult.

The fact that some people are saying that it happens only with certain entries makes me think that you should look for differences between entries where it works, and where it does not (especially with whatever settings are being overridden by the field). Also ensure that you're looking at the Twitter and Facebook override settings as well.

So I have a couple of choices going forward:

  1. You can try using the SEOmatic debug toolbar panel on the frontend to load the page where the values aren't set properly, and inspect the various meta containers to see what the values are: https://nystudio107.com/docs/seomatic/advanced.html#debug-toolbar -- you very likely will gain some clarity in what's going on by doing that
  2. We can set up a conference call to debug the issue on your local development environment, and find out exactly what's going on. You can book that time here: https://savvycal.com/nystudio107/chat
  3. Someone can email me their composer.json as well as the database dump for a project, and I can try to reproduce it here locally
khalwat commented 3 months ago

@jan-dh your issue sounds like a different issue than the one being discussed here. It could be the same, but it seems similar but different to me.

When you say "inspecting the entry" where you see the wrong image, what do you mean exactly? Do you mean when viewing it on the frontend?

If so, I'd try what I recommended above: You can try using the SEOmatic debug toolbar panel on the frontend to load the page where the values aren't set properly, and inspect the various meta containers to see what the values are: https://nystudio107.com/docs/seomatic/advanced.html#debug-toolbar -- you very likely will gain some clarity in what's going on by doing that

khalwat commented 3 months ago

Also @jan-dh make sure your SEO Settings field has the propagation method set as is appropriate for your multi-site setup

jan-dh commented 3 months ago

Ok, let me try to be more clear:

khalwat commented 3 months ago

In discussions with @jan-dh he is unable to replicate this in local dev, and based on some other things we've discussed, I'm fairly sure this is not actually the same issue as is being discussed in this thread, but rather is some kind of caching issue on their end.

As for @samuel-clara I'm hoping you can try one of the steps listed above?

samuel-clara commented 3 months ago

@khalwat I've sent you all you asked per mail to info@nystudio107.com Didn't receive it?

khalwat commented 3 months ago

@samuel-clara I did not -- can you try again please, or contact me on the Craft Discord?