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.
EntityManager should not be used in code base. We have to use EntityTypeManager.
Comment | File | Size | Author |
---|---|---|---|
#32 | interfiff_30_32.txt | 4.96 KB | anmolgoyal74 |
#32 | 2873522-32.patch | 35.73 KB | anmolgoyal74 |
#30 | interdiff_23_30.txt | 2.61 KB | MeenakshiG |
#30 | 2873522-30.patch | 34.39 KB | MeenakshiG |
#23 | interdiff-18-23.txt | 26.85 KB | MeenakshiG |
Comments
Comment #2
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound commentedComment #4
Jaypan CreditAttribution: Jaypan at Jaypan commentedNice work on this patch. Thanks!
Comment #5
almaudoh CreditAttribution: almaudoh commentedThis patch broke some things...
::getBundleInfo('user')
actually belongs inEntityTypeBundleInfo
class, so this should be changed to\Drupal::service('entity_type.bundle.info')->getBundleInfo('user')
Also,
This should not be changed since the super class
ContentEntityForm
still uses anEntityManager
object.Comment #6
Jaypan CreditAttribution: Jaypan at Jaypan commented@Munavijayalakshmi Do you want to provide a patch to fix that?
Comment #7
Jaypan CreditAttribution: Jaypan at Jaypan commentedFor the time being, I've reverted this patch. Hopefully Munavijayalakshmi will come along and pick it back up.
Comment #8
Jaypan CreditAttribution: Jaypan at Jaypan commentedI really dropped the ball with this, I should have checked the patch better before applying it. Munavijayalakshmi doesn't seem to be coming back, so I've created a new patch.
Comment #9
joshmillerNote there is a related Drupal core issue:
#2894261: Deprecated service entity.manager needs to be replaced with entity_type.manager in ContentEntityForm
Related to the following comment:
Comment #10
joshmillerComment #11
Jaypan CreditAttribution: Jaypan commented@joshmiller - I've read through the issue you linked, am I correct in understanding that it's not possible to switch from entity manager to entity type manager at this point in time? Or does it just need some additional loving?
Also, I checked out your guys' booth at Drupalcon - I'm originally from Kamloops (out of the country 20 years though) so I thought I'd say hello to some people from my neck of the woods!
Comment #12
Jaypan CreditAttribution: Jaypan commentedComment #13
joshmillerHi Jaypan.
Yes, basically, it's postponed until Core makes a class that we can extend that isn't deprecated.
Comment #14
Jaypan CreditAttribution: Jaypan commentedThanks Josh.
Comment #15
phjouIt seems that the core issue has been fixed. Can we try to fix that issue again?
Comment #16
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedSince the core issue is fixed, We can move forward with this.
Comment #17
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedComment #18
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedI have removed.
Comment #19
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedPlease also share the patch for 8.x-1.x-dev.
Comment #20
phjouThe current patch is not enough. When I check the code after applying the patch.
When I run grep -inr "entityManager" | wc -l , I have still 78 remaining references.
Comment #21
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedYes, there are many more instances, where changes need to be done.
Comment #22
MeenakshiG CreditAttribution: MeenakshiG at OpenSense Labs for DrupalFit commentedComment #23
MeenakshiG CreditAttribution: MeenakshiG at OpenSense Labs for DrupalFit commentedComment #24
MeenakshiG CreditAttribution: MeenakshiG at OpenSense Labs for DrupalFit commentedComment #26
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedComment #27
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedComment #29
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedReverted the last commit. There is some issue with the last patch.
Comment #30
MeenakshiG CreditAttribution: MeenakshiG at OpenSense Labs for DrupalFit commentedFixed the issue.
Comment #31
AkashKumar07 CreditAttribution: AkashKumar07 at OpenSense Labs commentedIn class private_message/src/Entity/Builder/PrivateMessageThreadViewBuilder.php
Please provide parent::__construct parameters in correct format.
Argument 2 to parent class expects EntityRepositoryInterface, instance of EntityTypeManager given.
Hope this will help.
Thanks
Comment #32
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedComment #33
AkashKumar07 CreditAttribution: AkashKumar07 at OpenSense Labs commentedI applied the patch and tested. It's working fine now. Thanks
Comment #35
anmolgoyal74 CreditAttribution: anmolgoyal74 at OpenSense Labs for DrupalFit commentedComment #36
anmolgoyal74 CreditAttribution: anmolgoyal74 for DrupalFit commentedFixed.
Feel free to re-open the issue if you face any issue.
Comment #37
zenimagine CreditAttribution: zenimagine commentedSorry to re-open this problem and the
/admin/structure/private-message/private-message-thread/display
page now displays :Comment #38
anmolgoyal74 CreditAttribution: anmolgoyal74 for DrupalFit commentedThanks for pointing out the error.
I will fix the error.
Comment #40
anmolgoyal74 CreditAttribution: anmolgoyal74 for DrupalFit commentedComment #41
zenimagine CreditAttribution: zenimagine commentedThanks it works
Comment #42
anmolgoyal74 CreditAttribution: anmolgoyal74 for DrupalFit commentedComment #43
anmolgoyal74 CreditAttribution: anmolgoyal74 for DrupalFit commented