Problem/Motivation
I'd like to upgrade my site but Entity Limit does not support D11.
Upgrade Status module scan reports 2 issues, both usages of user_roles().
Call to deprecated function user_roles(). Deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use Drupal\user\Entity\Role::loadMultiple() and, if necessary, an inline implementation instead.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3510678-d11-updates-dependency-injection.patch | 7.44 KB | jdvc |
Issue fork entity_limit-3510678
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:
Comments
Comment #2
orkutmuratyilmazComment #4
orkutmuratyilmazCan someone test and review this?
Comment #5
pearls commentedTested. Unable to add role limits.
Details
Comment #6
jdvc commentedHere is a new patch with updates and dependency injection updates. Resolved error for me.
Comment #7
jdvc commentedComment #8
jdvc commentedPatch with actual diff..
Comment #10
orkutmuratyilmaz@pearls, can you review the @jdvc's MR too?
Comment #11
orkutmuratyilmazSorry, I forgot saying that, I've applied the MR as a patch and scanned entity limit with upgrade status module:
No problems foundComment #12
pearls commented#8 patch is ok. But now the other patches can not be applied with this patch(#8).
3432063-Drupal calls should be avoided in classes, use dependency injection instead
3347700-checkAccess() throws an exception Invalid specifier 'type' with non node entities
Maybe, there must be a holistic solution.
Comment #13
orkutmuratyilmaz@pearls, I do agree with you. Should I contact one of the maintainers?
Comment #14
jdvc commentedYeah I tried messaging one of them, haven't heard anything, can't we just close the other two issues to merge this one in?
Comment #15
pearls commentedThe problems mentioned above(#12) are important and the patches created for them work without any problems. But unfortunately they were not merged. Maybe a new version should be created for d11.
I think entity_limit is an important module for Drupal environment, but unfortunately it did not get the value it deserved. If mainteinars has stopped supporting this module, maybe it would be good to replace it with those who do.
Comment #16
marvs5 commentedWhat do we need to do to get changes for D11 across the finish line? This module is the only thing preventing me from being able to move 2 D10 sites to D11.
Comment #17
orkutmuratyilmazthanks to @gaurav.goyal, I can create new releases and merge the requests too.
now, this issue is fixed in new 3.0.x-dev release.
if this one is refactored for the same release, we can go back to d11 compatibility issue as well.
@jdvc, @pearls, @marvs5 can you check the latest release?
Comment #18
ighosh commentedI can test the MR-4. And comment my findings/observations.
Comment #19
orkutmuratyilmaz@ighosh thank you:)
can you also read all the comments and consider the other issues, mentioned on #17?
Comment #24
orkutmuratyilmaz@jmaties, thanks for your patching and MR.
I've just tested it and it works so nice with D11. If nobody says something against it, I'll merge it in a week.
Comment #25
aquiniou commentedThanks @jmaties for the patch!
@orkut murat yılmaz any news on the merge? Would love to get a D11 version release here :)
Comment #26
orkutmuratyilmazMerge is done and 3.0.0-beta2 is released too.
Thanks to everyone:)
Comment #29
arx-e commentedSomething has gone wrong with this merge and one can not create new limits in Drupal 11.4.
I see MR !5 has produced a merge error.
Comment #30
orkutmuratyilmaz@arx-e, can you give more details about the "one can not create new limits in Drupal 11.4" part please?
Comment #31
arx-e commentedyes, of course: after installing the module in Drupal 11.4 I tried to create a new limit, I selected the values and when trying to save I got the following error:
Referrer
/en/admin/structure/entity_limit/add
Message
Error: Call to a member function getStorage() on null in Drupal\entity_limit\Plugin\EntityLimit\RoleLimit->buildConfigurationForm() (line 77 of .../drupalsite/web/modules/contrib/entity_limit/src/Plugin/EntityLimit/RoleLimit.php).
I used claude to solve this and I got the following reply that indeed solved the issue:
I am not 100% sure but I think most of these changes are contained in !MR5 that shows an error.
Comment #32
orkutmuratyilmazLet me work on it.
Comment #34
orkutmuratyilmaz@arx-e, can you check it now?
Comment #35
arx-e commentedYes, it works fine for me. I can add limits and the users are prevented from creating more nodes than the set limit.
Thank you!
Comment #36
arx-e commentedComment #37
orkutmuratyilmaz@arx-e, ευχαριστώ πολύ :)
Comment #39
arx-e commented@orkutmuratyilmaz teşekkür eden benim!