- 🇮🇳India NishaVaghela
I have applied and tested the patch in comment #4 , it is getting applied successfully.
There are no drupal check and upgrade status errors found , also the module in compatible to D10 .
Thus moving the issue to RTBC. - 🇺🇸United States bob.hinrichs
A release with d10 compatibility would be welcome!
- Status changed to Needs work
over 1 year ago 10:48am 9 August 2023 - Status changed to Needs review
over 1 year ago 1:04pm 10 August 2023 - 🇮🇳India sourabhjain
I have addressed the point mentioned in #5. Please review.
- Status changed to Needs work
over 1 year ago 1:28pm 10 August 2023 - 🇫🇷France GaëlG Lille, France
Thank you.
There's a problem in latest patch.
To explain what eelkeblock said: with the code change from prudloff, we now call
hasImplementations()
. But this method does not exist before Drupal 9.4.So yes, we must require 9.4+ or 10+, but we cannot accept 8 anymore or we will face this kind of issue: #3295521: Call to undefined method Drupal\Core\Extension\ModuleHandler::hasImplementations() for Drupal 9 < 9.4 →
- Assigned to sourabhjain
- 🇮🇳India sourabhjain
Apologies for the misreading.
let me create the new patch. - Issue was unassigned.
- Status changed to RTBC
over 1 year ago 3:49pm 10 August 2023 - 🇺🇸United States selwynpolit
I couldn't get this patch to apply so I rolled a local version and stuck it in a file.
Here are the contents of the file in case it helps someone:
diff --git docroot/modules/contrib/node_access_rebuild_progressive/node_access_rebuild_progressive.info.yml docroot/modules/contrib/node_access_rebuild_progressive/node_access_rebuild_progressive.info.yml index 1a0e13eec..f322ff847 100644 --- docroot/modules/contrib/node_access_rebuild_progressive/node_access_rebuild_progressive.info.yml +++ docroot/modules/contrib/node_access_rebuild_progressive/node_access_rebuild_progressive.info.yml @@ -1,7 +1,7 @@ name: 'Node Access Rebuild Progressive' description: 'Rebuild node access grants in chunks' type: module -core_version_requirement: ^8 || ^9 +core_version_requirement: ^9.4 || ^10 # Information added by Drupal.org packaging script on 2020-06-23 version: '2.0.0' diff --git docroot/modules/contrib/node_access_rebuild_progressive/node_access_rebuild_progressive.module docroot/modules/contrib/node_access_rebuild_progressive/node_access_rebuild_progressive.module index 45f7c8a41..d2fc50637 100644 --- docroot/modules/contrib/node_access_rebuild_progressive/node_access_rebuild_progressive.module +++ docroot/modules/contrib/node_access_rebuild_progressive/node_access_rebuild_progressive.module @@ -36,7 +36,7 @@ function node_access_rebuild_progressive_trigger() { node_access_needs_rebuild(FALSE); // Add default grants in the unlikely case // no modules implement node_grants anymore. - if (!count(\Drupal::moduleHandler()->getImplementations('node_grants'))) { + if (!count(\Drupal::moduleHandler()->hasImplementations('node_grants'))) { node_access_rebuild_progressive_set_default(); return node_access_rebuild_progressive_finished(); }
I added it as node_access_rebuild_progressive_d10.patch in my patches folder
Here are the relevant lines in composer.json:
"patches": { "drupal/node_access_rebuild_progressive": { "Automated Drupal 10 compatibility fixes - 3288770": "patches/node_access_rebuild_progressive_d10.patch" }
- 🇺🇸United States alphex Atlanta, GA USA
@selwynpolit - solved it for me.
Thanks
- 🇺🇸United States justcaldwell Austin, Texas
With any luck #3388337: Offer to co-maintain Node Access Rebuild Progressive → will be resolved in another week or so, and we can hope for some movement on this. 🤞
- Status changed to Fixed
about 1 year ago 4:42am 13 October 2023 - 🇺🇸United States shelane
Thanks. I've rolled this into the 2.x branch. There are a couple of minor updates I would like to apply before a new release. That should happen next week.
- 🇫🇮Finland oakulm
Not really sure about this fix..
count expects to get array|Countable parameter and \Drupal::moduleHandler()->hasImplementations returns bool.
See https://www.php.net/manual/en/function.count.php & https://www.drupal.org/node/3000490 →
So the correct way would be to:
if (!\Drupal::moduleHandler()->hasImplementations('node_grants')) {
So anyone tested the command drush node-access-rebuild-progressive and it runs without errors...?
- Status changed to Needs work
about 1 year ago 1:50pm 13 October 2023 - 🇺🇸United States robphillips
@oakulm is correct. Patch in #17 and thus the re-rolled #18 is incorrect. Resulting in the
[error] TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given
fatal. Patch #13 is implemented correctly but needs re-rolled. - Status changed to Needs review
about 1 year ago 1:56pm 13 October 2023 - 🇺🇸United States robphillips
And again because last one didn't apply cleanly.
- Status changed to Fixed
about 1 year ago 2:04pm 17 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
10 months ago 4:34pm 6 February 2024 - 🇺🇦Ukraine goodDenis
Look like we pushed the wrong fix :(
should be
if (!\Drupal::moduleHandler()->hasImplementations('node_grants')) {
but we pushed
if (\Drupal::moduleHandler()->hasImplementations('node_grants')) {
- 🇫🇷France prudloff Lille
This will be fixed by 🐛 All entries in the node_access table get deleted when running node-access-rebuild-progressive RTBC .