The Update Status module shows the following issues:
content_access/content_access.module, line 696
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.
content_access/content_access.module, line 841
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.
content_access/content_access.module, line 592
File modules/contrib/content_access/content_access.admin.inc could not be loaded from Drupal\Core\Extension\ModuleHandlerInterface::loadInclude
content_access/content_access.info.yml, line 4
Value of core_version_requirement: ^9.4 || ^10 is not compatible with the next major version of Drupal core.
Would be great if someone could create a patch that fixes these issues. Thank you!
| Comment | File | Size | Author |
|---|
Issue fork content_access-3479745
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
ananya.k commentedComment #3
ananya.k commentedI have made some changes. Please refer to attached patch.
Comment #4
michèle commentedThank you so much @ananya.k!
I was able to install the patch without any problems. I will test the functionality after the Drupal 11 upgrade (I'm currently in the preparation stages).
Comment #8
steven jones commentedHmm...thanks for the work here, I wonder if we need to wait for ACL to have a Drupal 11 version: #3428079: Automated Drupal 11 compatibility fixes for acl
I wonder if we could get most of these changes into our module anyway, and leave off actual Drupal 11 support until ACL has it.
Comment #9
michèle commentedThank you, olmyr!
The merge request !16 seems to work very well with Drupal 10.3.6.
I will test the functionality after the Drupal 11 upgrade (I'm currently in the preparation stages).
Comment #10
michèle commented@steven jones
I was not aware of the dependency with ACL.
Unfortunately, I cannot yet test whether Content Access works correctly with Drupal 11 (despite the lacking Drupal 11 version for ACL), as I cannot yet upgrade from Drupal 10.3.6 to Drupal 11 (PHP 8.3 is missing).
Do you think that it is not possible to install Drupal 11 as long as there is no Drupal 11 version for ACL?
Comment #11
steven jones commentedAh, ACL is an optional dependency, so I think we can upgrade to Drupal 11 before ACL, we just can't test with ACL at the moment.
Comment #12
alt.dev commentedI attach the latest patch from the MR just in case this task won't be merged soon.
Comment #13
michèle commentedI can now confirm that the patch works with Drupal 11.0.5 (I have not installed ACL because I do not need the functionality).
Comment #14
michèle commentedComment #15
rahul17 commentedVerified changes from MR !16 in Drupal 10 and Drupal 11, functionality is working fine.
RTBC +1
Comment #16
mregnault commentedI had trouble installing the patch with Drupal 10.3.10, apparently some of the modifications on the
content_access.modulefile can not be applied (the changed order in the use statements). I recreated a patch by changing just that and it works for me. I leave the patch here in case someone stumbles upon the same issue.Comment #17
jurgenhaasRTBC+1, this would unlock a test blocker for other modules on Drupal 11 who depend on this.
Comment #18
flyke commentedI confirm #16: The MR did not apply to the latest dev, but patch from #16 did.
Comment #19
jurgenhaasThe MR applies nicely, so I'm wondering which code base you've tried to patch. Was it 2.0.0 or 2.0.x-dev?
Comment #20
flyke commented@jurgenhaas: apologies, tried this today on another project that I have now successfully updated from D10.4 to D11.1.
The MR applied and all seems to be working. No idea why the MR did not apply to the other project, probably a conflicting patch or something.
Comment #21
a.kahn commentedI have used this module on Drupal-7, 9 and 10 websites. Looking forward for Drupal-11 version. Thanks.
Comment #22
tjtj commentedPlease release the D11 version!
Comment #23
steven jones commentedACL just got a stable release for Drupal 11, so we should be able to progress this properly now.
Let's go back to reviewing the MR.
Comment #24
steven jones commentedAll tests are passing in Drupal 10 and 11!
Comment #25
steven jones commentedSpotted that we've got a function exists call that might be masking something, committed removing that and will see if the tests still pass, if they do then I think we can cut a 2.1.0-rc1 release.
Comment #27
steven jones commentedOkay, that seems to still work, I'd rather get the fatal error if it is coded wrong and the bug reports than silently ignoring it at runtime.
2.1.0-rc1 here we come.
Comment #28
steven jones commentedMade the release: https://www.drupal.org/project/content_access/releases/2.1.0-rc1
Comment #29
steven jones commentedThanks everyone for the work on providing code and testing, much appreciated.