craftcms / craftcms/cms

Installing craft with existing project config leads to duplicate default sites

Open
#7,968 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

Description

Installing a project on a clean database by running ./craft setup seems to always lead to a duplicate of the default site from the project config being created. It uses the same settings, but is created with a different ID / UUID, so you have to manually remove it and replace it with the default site from project config afterwards.

Steps to reproduce
  1. Create a project on a local environment, creating a default site with project config enabled, assign some entries etc.
  2. Add the project files, including project config, to some version control system
  3. Install the project on another computer, pulling in the setup from the other environment
  4. Craft is installed, but now a duplicate of the default site can be seen in the project config directory
Additional info
  • Craft version: 3.6.14
  • PHP version: 7.4
  • Database driver & version: MySQL 8
  • Plugins & versions: n/a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with ./craft setup on a clean MySQL 8 database using the existing project config and the steps above. Trace the installation path that creates sites and compare the created site with the project-config default; done means setup creates only the configured default site without a duplicate.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.