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

Sitename is not added to some single pages #1333

Closed grndctrl closed 1 year ago

grndctrl commented 1 year ago

Describe the bug

Sitename is not added, either before or after depending on global settings, for some pages. for instance, I have a Home page where the title becomes sitename | entry.title or "Cyberfusion | Home" in this case. but for the About page the title just stays "About".

To reproduce

Steps to reproduce the behaviour: Have multiple single pages, all with the exact same SEO field. leave override fields disabled.

Expected behaviour

Put the site name before every title.

Screenshots

See SEO preview

Screenshot 2023-06-14 at 22 04 13

Versions

khalwat commented 1 year ago

What are your Content SEO settings for the sections in question where it does not appear as you're expecting it to?

grndctrl commented 1 year ago

Both settings were "Custom position > Before" for Sitename, but hitting save on the Content SEO settings fixed it. I will just save it manually, but I expected it to also work hitting save on the entry itself.

khalwat commented 1 year ago

hmmm strange, you should not have to re-save those settings in Content SEO for it to take effect

grndctrl commented 1 year ago

That's what I thought. But I can't find anything different between the two pages. Nor do I remember anything different, besides that I added the About page much later. If anything pops up I let you know.

remcoov commented 1 year ago

Hi, we have exactly the same issue. This is new, never had this before.

kevinmu17 commented 1 year ago

Hmmm. tried to crosscheck a project where this works as expected, both running the same version

SEOmatic | 4.0.27

SEOmatic | 4.0.27
khalwat commented 1 year ago

@remcoov @kevinmu17 please try the resolution that is indicated in this thread, which is to re-save the Content SEO settings for the affected sections in SEOmatic -> Content SEO

J-Protz commented 1 year ago

I have this same issue not just for singles. On creation the sitename is excluded despite it being the sitewide default. Resaving in "content" fixes.

all versions:


 "require": {
        "born05/craft-assetusage": "3.2.0",
        "carlcs/craft-uielementfields": "2.0.3",
        "craftcms/ckeditor": "3.5.1",
        "craftcms/cms": "4.5.3",
        "craftcms/element-api": "3.0.1.1",
        "craftcms/feed-me": "5.2.0",
        "craftcms/redactor": "3.0.4",
        "doublesecretagency/craft-matrixcolors": "3.0.0",
        "nystudio107/craft-retour": "4.1.13",
        "nystudio107/craft-seomatic": "4.0.30",
        "nystudio107/craft-vite": "4.0.6",
        "pennebaker/craft-architect": "4.0.1",
        "presseddigital/linkit": "4.0.4.1",
        "putyourlightson/craft-blitz-recommendations": "2.1.1",
        "servd/craft-asset-storage": "3.4.11",
        "solspace/craft-freeform": "4.1.6",
        "spacecatninja/imager-x": "4.2.2",
        "vaersaagod/matrixmate": "2.1.3",
        "verbb/navigation": "2.0.20",
        "verbb/super-table": "3.0.9",
        "vlucas/phpdotenv": "^3.4.0",
        "wbrowar/adminbar": "3.2.0"
    },
khalwat commented 1 year ago

Related: https://github.com/nystudio107/craft-seomatic/issues/1321

khalwat commented 1 year ago

Tracked this down; this should be fixed now for newly created sections.

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop as 3.4.60”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v4 as 4.0.31”,

Then do a composer clear-cache && composer update

J-Protz commented 1 year ago

@khalwat will this fix sections already created, or only new ones? Thanks for the fix, will update today!

khalwat commented 1 year ago

Only newly created sections

kevinmu17 commented 1 year ago

@khalwat yessir! nailed it for me. both problems solved! Site Name Position Source is now set to the correct same as global Site Name Position & the Site name is present after the title!

Thanks for the fast response!

J-Protz commented 1 year ago

@khalwat confirmed on my end, as well! Thank you!

khalwat commented 1 year ago

Awesome. Thanks for your help & patience guys.