Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#13 | field_collection-drupal9-3185260-13.patch | 10.26 KB | jimkeller |
#6 | image (1).png | 49.15 KB | Frederikvho |
#6 | field_collection-drupal9-3185260-6.patch | 9.37 KB | Frederikvho |
Issue fork field_collection-3185260
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3185260-drupal-9 changes, plain diff MR !4
- dev-3185260-drupal-9 compare
- 3185260-d9-fixes changes, plain diff MR !2
Comments
Comment #2
Shruthi Shetty M CreditAttribution: Shruthi Shetty M at Specbee commentedComment #3
DamienMcKennaLet's combine this with #3185394: Removed function drupal_set_message(),entityManager(), entity_get_form_display(),strlen(),entity_get_display(). and make one patch / merge request that makes the module compatible with D9.
Comment #4
FrederikvhoHi,
I combined the two patches like DamienMcKenna suggested.
Comment #5
DamienMcKennaExcellent, thank you @frederikvho.
Has anyone ran FC on Drupal 9 with the patches?
Comment #6
FrederikvhoHi @damienmckenna,
Thanks for the quick feedback. I tried installing it but ran into PHP errors. Had to alter two more lines of deprecated code. So I have updated the patch.
However, after repeating the process with the updated version of the patch I am unable to add new field collections.
For reference see this screenshot:
Not sure what the cause could be.
Comment #8
DamienMcKennaFYI I uploaded the codebase as a merge request for people to use.
Comment #9
joaopauloscho CreditAttribution: joaopauloscho at Zoocha commentedHas someone faced a composer conflict with drupal 9?
Problem 1
- Installation request for drupal/field_collection 3.x-dev@dev -> satisfiable by drupal/field_collection[3.x-dev].
- Conclusion: remove drupal/core 9.0.0
- Conclusion: don't install drupal/core 9.0.0
- drupal/field_collection 3.x-dev requires drupal/core ^8 -> satisfiable by drupal/core[8.0.x-dev, 8.1.x-dev, 8.2.x-dev, 8.3.x-dev, 8.4.x-dev, 8.5.x-dev, 8.7.x-dev, 8.8.x-dev, 8.9.x-dev].
Comment #10
XLD CreditAttribution: XLD as a volunteer commented@DamienMcKenna, shouldn't the MR be against 8.x-3.x branch? At the moment it is against 7.x.
Comment #12
DamienMcKennaYeah, I think I borked up the merge request and made it against the 8.x-1.x branch instead of the 8.x-3.x branch. I've closed that one, so we'll need to create a new one.
Comment #13
jimkeller CreditAttribution: jimkeller commented#6 was largely working for us, except that when trying to add additional collections we got the error "Uncaught PHP Exception Drupal\Core\Security\UntrustedCallbackException: "Render #pre_render callbacks must be methods of a class that implements
\Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function."
This is due to deprecated handling of #pre_render . The attached patch has everything from #6 along with a fix for the TrustedCallbackInterface problem.
Thanks to /u/atourino for the fix.
Comment #15
DamienMcKennaComment #16
eleonelIn case you need to use this patch in your composer.json file you can do the following:
Then under require key
"drupal/field_collection": "dev-3185260-drupal-9"
Comment #17
aangel CreditAttribution: aangel commentedThanks for this, @eleonel. I also had to add the following exclusion key so that composer would look into the second repo:
Comment #18
SerShevchykThe patch https://git.drupalcode.org/project/field_collection/-/merge_requests/4.diff works fine for me. I have tested with Upgrade Status module.
Comment #20
x775 CreditAttribution: x775 commentedHi there
What is the current status on this effort?
Thanks!
Comment #21
DamienMcKennaWe need a maintainer to commit the changes.
Comment #23
fagoChanges seem good to me and MR has positive test results, thus merged. Please re-open if there left issues.
Comment #24
fagoComment #25
JCL324Comment #27
drupalfan2 CreditAttribution: drupalfan2 as a volunteer commentedPlease publish the first Drupal 9 version of field_collection on project page .