[4.x]: translationMethod setting from MatrixBlockTypes not applied when using project-config/apply command
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
I believe I found this bug when trying to make a field inside a matrix block translatable for each site.
I tried making a simple plain text field translatable for each site in my local environment. This worked and the project config file were update to translationMethod: site inside the matrixBlockTypes config files, along the the dateModified project.yaml
So I deployed this and noticed the fields weren't translatable on the dev and production environment using the ./craft migrate/all and ./craft project-config/apply commands.
For some reason the translationMethod: site setting from the config files is not being applied.
Steps to reproduce
- Created clean install on local machine.
- Create an extra site
- Create simple matrix field with for example titleField and textField (not translatable yet)
- Update
config/project/matrixBlockTypes/****yamlfile and settranslationMethodtosite. - Update dateModified in project.yaml
- Use
./craft project-config/applycommand.
Expected behavior
You expect that the fields translationMethod setting changes to for each site.
Actual behavior
The fields translationMethod does not change add all. When you save the field again the config file gets updated to translationMethod: none again.
Craft CMS version
4.5.6.1
PHP version
8.0
Operating system and version
Mac os 13.4 (22F66)
Database type and version
mysql
Image driver and version
No response
Installed plugins and versions
"require": {
"craftcms/cms": "^4.4.0",
"craftcms/redactor": "^3.0",
"vlucas/phpdotenv": "^5.4.0"
},
"require-dev": {
"craftcms/generator": "^1.3.0",
"yiisoft/yii2-shell": "^2.0.3"
},
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 by reproducing the issue with the described matrixBlockTypes configuration and the project-config/apply command. Trace how the command reads the matrix block type configuration and applies translationMethod; done means site-level translation is applied and remains site after the field is saved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100