Open avasquez614 opened 3 weeks ago
This can happen when the sourceSiteName sent to the duplicate target hook is empty (probably due to misconfiguration in the target template). The hook has been updated so it prevents its execution when sourceSiteName is an empty value.
Duplicate is still failing for anothe reason. In the duplicate code in Deployer we're calling resolveTargetFromConfigFile
before executeDuplicateHooks
. These causes the init
hooks to be executed before the duplicate
hooks. init
should be always executed after the create
and duplicate
hooks (see https://github.com/craftercms/deployer/blob/develop/src/main/java/org/craftercms/deployer/impl/TargetServiceImpl.java#L411). I think we need to modify the loadTarget
method to accept a CreateMode
enum (which can be either CREATE
or DUPLICATE
) instead of passing a boolean so we can correctly call the correct create
or duplicate
hooks before the init
hooks.
Updated so init hooks are executed after create/duplicate hooks
Verified in 4.1.4
Duplicates
Latest version
Describe the issue
When using Studio with AWS OpenSearch and trying to duplicate a site, it fails because OS blocks
/_settings
Steps to reproduce
Steps:
Duplication fails in Studio, and in the Deployer you can see an error like the one attached
Relevant log output
Screenshots and/or videos
No response