craft-seomatic
craft-seomatic copied to clipboard
Copy Settings From not working as intended for Content SEO
Describe the bug
When having multiple sites, the Copy Settings From feature isn't working properly in some cases. We tried doing this in a section with 5 entry types.
Adding the correct values works fine on the original site, but when trying to copy settings from the original site onto the new site (eg. English UK → English US), it automatically jumps back to the first entry type in the dropdown list and only the first entry type gets updated.
To reproduce
Steps to reproduce the behaviour:
- In Craft CMS, create another site to have a total of at least 2 sites (eg. English UK and English US)
- Create a section (eg. knowledgeHub) with 5 entry types (eg. webinar, upcomingWebinar, ebook, caseStudy, article).
- In the Content SEO settings, put in different values for each entry type from that section in the original site.
- In the site dropdown list, click on a site other than the original one.
- Choose any entry type other than the first option, and copy the site settings from the original site.
- Check if the values successfully get copied from the original site and/or if the list of entry types has reverted to the first option.
Expected behaviour
All the values from the original site should successfully get copied to all the entry types values in the other site(s).
Screenshots
1~5: original site (en-UK), the different entry types. Tested with the SEO title source value.
Video: second site (en-US). Process of trying to copy entry types from the original site onto this site.
https://github.com/nystudio107/craft-seomatic/assets/72446674/a753daec-517f-4d92-9c26-a40c15b672f5
Versions
- Plugin version: 4.0.32
- Craft version: 4.5.6.1
Ah I see. I think the issue is that it's not taking the entry type into account.
@khalwat is there a way to take it into account, or a workaround? All of our other sections have no issues, only this one for some reason.
We already have a lot of entries for each of these entry types (webinars, e-book, etc.)
It's on my list to have a look at -- I just first need to get a setup where I can duplicate the problem, then I can figure out what is wrong and fix it.
You say it only fails to work properly on one particular section? For other sections where it does work, do you have a similar setup of multiple sites with multiple entry types?
Sorry for the late reply @khalwat. Yes, that is correct. These are all of the sections that are being used throughout the site:
The problem is located with the different entry types within the Knowledge hub (channel) section. The Jobs (channel) section only has one (default) entry type so no issues there. And the sections that have the structure type and multiple entry types are working fine.
So perhaps the channel type is causing the issue?
Hi. Any update on this yet?
Have not forgotten about this, it's on the list for the next update to SEOmatic.
I've been working on porting SEOmatic to Craft 5, which is now done. Thanks for your patience. https://github.com/nystudio107/craft-seomatic/releases/tag/5.0.0-beta.2
Can I ask if there is a version for Craft 4 where this bug is fixed? We stumbled upon the same problem.
No update yet.
Addressed in the above commits.
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.75”,
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.46”,
Then do a composer clear-cache && composer update
…..
Craft CMS 5:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-seomatic": "dev-develop-v5 as 5.0.0-beta.9”,
Then do a composer clear-cache && composer update