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!

Command icon 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

michèle created an issue. See original summary.

ananya.k’s picture

Assigned: Unassigned » ananya.k
ananya.k’s picture

Assigned: ananya.k » Unassigned
Status: Active » Needs review
StatusFileSize
new1.36 KB

I have made some changes. Please refer to attached patch.

michèle’s picture

Thank 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).

olmyr made their first commit to this issue’s fork.

olmyr changed the visibility of the branch 3479745-drupal-11-compatibility to hidden.

steven jones’s picture

Hmm...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.

michèle’s picture

Thank 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).

michèle’s picture

@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?

steven jones’s picture

Ah, 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.

alt.dev’s picture

StatusFileSize
new8.47 KB

I attach the latest patch from the MR just in case this task won't be merged soon.

michèle’s picture

I can now confirm that the patch works with Drupal 11.0.5 (I have not installed ACL because I do not need the functionality).

michèle’s picture

Status: Needs review » Reviewed & tested by the community
rahul17’s picture

StatusFileSize
new356.49 KB
new58.29 KB

Verified changes from MR !16 in Drupal 10 and Drupal 11, functionality is working fine.
RTBC +1

mregnault’s picture

StatusFileSize
new4.47 KB

I had trouble installing the patch with Drupal 10.3.10, apparently some of the modifications on the content_access.module file 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.

jurgenhaas’s picture

RTBC+1, this would unlock a test blocker for other modules on Drupal 11 who depend on this.

flyke’s picture

Status: Reviewed & tested by the community » Needs work

I confirm #16: The MR did not apply to the latest dev, but patch from #16 did.

jurgenhaas’s picture

The 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?

flyke’s picture

Status: Needs work » Reviewed & tested by the community

@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.

a.kahn’s picture

I have used this module on Drupal-7, 9 and 10 websites. Looking forward for Drupal-11 version. Thanks.

tjtj’s picture

Please release the D11 version!

steven jones’s picture

Status: Reviewed & tested by the community » Needs review

ACL 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.

steven jones’s picture

Status: Needs review » Reviewed & tested by the community

All tests are passing in Drupal 10 and 11!

steven jones’s picture

Status: Reviewed & tested by the community » Needs review

Spotted 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.

  • steven jones committed b6d49bd7 on 2.0.x authored by olmyr
    Issue #3479745 by olmyr, steven jones, ananya.k, rahul17, michèle, flyke...
steven jones’s picture

Status: Needs review » Reviewed & tested by the community

Okay, 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.

steven jones’s picture

Status: Reviewed & tested by the community » Fixed
steven jones’s picture

Thanks everyone for the work on providing code and testing, much appreciated.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.