Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SiteId to sourceSite Comparison breaking change #13

Closed
adevendorf opened this issue Apr 27, 2020 · 4 comments
Closed

SiteId to sourceSite Comparison breaking change #13

adevendorf opened this issue Apr 27, 2020 · 4 comments
Assignees

Comments

@adevendorf
Copy link

Looks like the latest change completely broke the functionality of this plugin.

With Line 167 in services/SiteCopy.php (see code below), siteId is an integer, but sourceSite is a string. Changing it so it's not so strict fixes the problem.

if ($entry->siteId !== $elementSettings['sourceSite']) { return; }

Can anyone explain the reasoning for the change, or is this a bug?

@adevendorf adevendorf changed the title Site to Source Site Comparison breaking change SiteId to sourceSite Comparison breaking change Apr 27, 2020
@lukasNo1
Copy link
Contributor

Which craft version do you use?
I tested it with Craft 3.4.9, where the siteId is returned as string.
Craft doku says its an integer though.

I will remove the strict check for compatibility with past/future versions.

@adevendorf
Copy link
Author

This is using the latest version as of yesterday 3.4.17.1

@adevendorf
Copy link
Author

adevendorf commented Apr 28, 2020

I should add, I noticed the plugin had stopped working before I upgraded to 3.4 as well (from 3.3.20)

@lukasNo1
Copy link
Contributor

Weird. i also get a string siteId on my entries in 3.4.17.1. Gonna investigate this further.

I just released version 0.5.2, where i removed the strict check. It should work for both cases now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants