@erwangel
When I developed my fix described in #20 📌 Automated Drupal 10 compatibility fixes RTBC comment #18 had not been posted.
Using mglaman/composer-drupal-lenient is a much better solution than aliasing the core version. You can target only the package for which you want composer to ignore the core version constraints. This also addresses the concerns you expressed above.
I have tested this and if works fine with patch at #11 📌 Automated Drupal 10 compatibility fixes RTBC . The patch at #17 does not actually patch the module's info file for D10!
@erwangel
I managed to get composer to install drupal/field_collection": "dev-4.0.x with patch #17.
First I added an explicit requirement for drupal/core 10.1.6 aliased as 9.5.11 to the required section of composer.json.
"require": {
...
"drupal/core": "10.1.6 as 9.5.11",
"drupal/core-composer-scaffold": "^10.0.0",
"drupal/core-recommended": "^10.0.0",
...
}
... and then ran composer update drupal/core.
Then I added the patch to my composer.json:
"extra": {
...
"patchLevel": {
"drupal/core": "-p2"
},
"enable-patching": true,
"patches": {
"drupal/field_collection": {
"3297187 - Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2023-10-25/field_collection_for_drupal10.patch"
}
}
}
Then ran composer require 'drupal/field_collection:dev-4.0.x'.
Puzzled over this for a couple of days. Not a well documented solution to the problem of installing D9 modules patched for D10.
Confirming that patch #9 will not apply against 8.x-1.3 but does work with dev-1.x.
Also encountering this issue but my field is not mapped to a Gutenberg editor template block. Unable to save a new node that has a media field or image field, required or not.
Work around is to disable the 'Gutenberg experience' on the content type, create the new content item with image, save it, then re-enable Gutenberg on the content type. Editing then works fine, even replacing the image with another.
Very keen to use the Gutenberg editor on a client's site but this is not possible while this problem persists.
I'm sure there are quite a number of site builders who think 'layout components is just what I need!' and are then sorely disappointed that it won't install because of this issue.
A new version fixing this issue would be very welcome.