craftercms / craftercms

Parent project for Crafter CMS. Issue tracking across all repositories and global builds.
GNU General Public License v3.0
282 stars 98 forks source link

Duplicate without specifying a branch fails #6726

Open avasquez614 opened 2 weeks ago

avasquez614 commented 2 weeks ago

Duplicates

Latest version

Describe the issue

Duplicating with specifying nothing in the Git Branch fails

Steps to reproduce

Steps:

  1. Create a site based on Editorial
  2. Publish all
  3. Try to duplicate the site. Don't specify anything in the Git Branch input

You'll get an error like the attached one

Relevant log output

https://gist.github.com/avasquez614/fd8c3bf461358f1dcf6d4596cc2c73fa

Screenshots and/or videos

No response

avasquez614 commented 2 weeks ago

@jmendeza If I have a site with a develop branch and duplicate it and don't specify the branch, the duplicate is done based on master instead of develop (which is wrong). It does work if I duplicate that develop site and specify a tag like feature-1

jmendeza commented 2 weeks ago

It seems the issue is that master branch already exists. So it remains as is. We should re-create the sandbox branch if it already exists and it is different from the we are site duplicating from

avasquez614 commented 2 weeks ago

After discussing it woth @jmendeza and @sumerjabri, we decided that we should not allow duplication into branches that already exist. A new branch name needs to be specified. WIll create a new ticket.

This has been verified in 4.1.4