[5.x]: When the Content Block field contains a Matrix field, creating a draft results in an error: Attempting to duplicate an element in an unsupported site
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
When the Content Block field contains a Matrix field, creating a draft results in an error:
The draft could not be saved.
Attempting to duplicate an element in an unsupported site.
Steps to reproduce
The record screen: https://www.awesomescreenshot.com/video/48581983?key=a149ff40afc09785bf1a5af480e71c84
- When the Content Block field contains a Matrix field in entry.
- Click the
Add a site... - Click the
Create a draft
Expected behavior
Create a draft
Actual behavior
Get a Error.
Unsupported site – craft\errors\UnsupportedSiteException
Attempting to duplicate an element in an unsupported site.
https://github.com/user-attachments/assets/c776ae2f-9569-4196-bf21-590e50c54b2e
Craft CMS version
Craft Solo 5.8.23
PHP version
8.2.19
Operating system and version
Linux 6.6.87.2-microsoft-standard-WSL2
Database type and version
PostgreSQL 15.15
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.1-13)
Installed plugins and versions
No plugins are enabled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the record-screen reproduction using a Content Block field containing a Matrix field, then trace the UnsupportedSiteException reported when selecting a site and creating a draft. Done means the draft is created successfully without the unsupported-site error in the reported Craft CMS and PostgreSQL setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100