Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When an entry is matched on another site,
Entry::checkPropagation()gives it a status for the feed's target site, so thecustompropagation method treats that site as supported. Until now that status was copied from the site the entry was found on.It now uses the section's Default Status for the target site, the same way
setModel()does for new entries. If there are no site settings for the target site, it falls back to the previous behavior. A mapped status still overrides it afterwards, so this only changes imports where the status is set to "Don't import".This changes behavior: imports that relied on the copied status will now get the target site's Default Status instead. To keep entries enabled, map the status or turn on Default Status for that site.
Tests: added a test to
ProcessTestcovering both Default Status values for the target site.Commerce products
CommerceProduct::checkPropagation()uses the same pattern ($existingElement->getEnabledForSite()), so products matched on another site probably end up with that site's status on the target site too. Product types also have a per-site Default Status (ProductTypeSite::$enabledByDefault), whichCommerceProduct::setModel()already uses for new products, so the same change would likely apply there. I left it out of this PR because I couldn't test it, since Commerce isn't a dev dependency.Related issues
Fixes #1787
Related: #1279, #1292