craft-seomatic icon indicating copy to clipboard operation
craft-seomatic copied to clipboard

Copy Settings From not working as intended for Content SEO

Open nicolascnudde opened this issue 1 year ago • 6 comments

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:

  1. In Craft CMS, create another site to have a total of at least 2 sites (eg. English UK and English US)
  2. Create a section (eg. knowledgeHub) with 5 entry types (eg. webinar, upcomingWebinar, ebook, caseStudy, article).
  3. In the Content SEO settings, put in different values for each entry type from that section in the original site.
  4. In the site dropdown list, click on a site other than the original one.
  5. Choose any entry type other than the first option, and copy the site settings from the original site.
  6. 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.

seomatic_issue_1

seomatic_issue_2

seomatic_issue_3

seomatic_issue_4

seomatic_issue_5

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

nicolascnudde avatar Oct 23 '23 12:10 nicolascnudde

Ah I see. I think the issue is that it's not taking the entry type into account.

khalwat avatar Nov 02 '23 23:11 khalwat

@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.)

nicolascnudde avatar Nov 21 '23 09:11 nicolascnudde

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?

khalwat avatar Nov 23 '23 16:11 khalwat

Sorry for the late reply @khalwat. Yes, that is correct. These are all of the sections that are being used throughout the site:

Screenshot 2023-12-06 at 10 48 31

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?

nicolascnudde avatar Dec 06 '23 09:12 nicolascnudde

Hi. Any update on this yet?

nicolascnudde avatar Jan 16 '24 09:01 nicolascnudde

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

khalwat avatar Jan 24 '24 16:01 khalwat

Can I ask if there is a version for Craft 4 where this bug is fixed? We stumbled upon the same problem.

yannkost avatar Mar 20 '24 08:03 yannkost

No update yet.

khalwat avatar Mar 20 '24 17:03 khalwat

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

khalwat avatar Apr 03 '24 21:04 khalwat