craftcms / craftcms/cms

Matrix content lost on entry duplicate or 'save as new entry'

Open
#9,751 4 comments 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

Since upgrading to craft 3.7 (currently running 3.7.9) all matrix content gets lost on duplicating an entry or saving as new entry. Either on the existing entry and the newly created entry.
Any chance this is a bug in one of the latest versions?

Steps to reproduce
  1. Create an entry with a matrix field
  2. Populate matrix field with one or more blocks
  3. Duplicate the entry or 'save as new entry'
Additional info
  • Craft version: 3.7.9
  • PHP version: 7.4.12
  • Database driver & version: MySQL 5.7.32
  • Plugins & versions: various plugins

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

Reproduce the issue on Craft 3.7.9 with PHP 7.4.12 and MySQL 5.7.32 using an entry containing populated Matrix blocks. Start by tracing the duplicate and “save as new entry” flows; done means the Matrix content remains in both the original and newly created entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend
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.