Steps to reproduce:

Standard install Drupal 8.7.7-dev
* Ban module is off
* Enable Rules module (8.3.x-dev https://git.drupalcode.org/project/rules/commit/f042e61) (with 0 Rules)
* Structure -> block layout -> configure block

You then get the following WSOD error in the logs:
Uncaught PHP Exception Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: "You have requested a non-existent service "ban.ip_manager"." at /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php line 153, referer: http://site.lndo.site/admin/structure/block

CommentFileSizeAuthor
#6 3073653-rules_ban_support.patch6.38 KBmjgruta
#5 rules_ban.patch6.36 KBtr

Comments

philosurfer created an issue. See original summary.

philosurfer’s picture

Issue summary: View changes
tr’s picture

Added related issues.

I need confirmation that this goes away when the patch in #2330203: Add an 'unblock IP address' action is reversed OR when the ban module is enabled.

If this is confirmed, then I will probably reverse #2330203: Add an 'unblock IP address' action before rolling the new Rules release (which I want to get done in the next few days) and re-open that issue for further review.

mjgruta’s picture

Status: Postponed (maintainer needs more info) » Active

Error is gone when I enabled Ban module, haven't tested reversing the patch.

tr’s picture

Status: Active » Needs review
StatusFileSize
new6.36 KB

I think the only way to avoid this sort dependency problem in plugins, given the current status of core, is to put all the 'ban' related actions and conditions into a submodule. That's something we've avoided, but #3033431: Allow RulesIntegrationTestBase to discover contributed modules has made unit testing of submodules possible (it wasn't before then).

So here's a patch to move these plugins. I still want to add a README.txt for this new submodule...

I would appreciate a review to confirm that this patch solves the problem without requiring the ban module to be enabled.

mjgruta’s picture

StatusFileSize
new6.38 KB

The patch works but I think the module title needs to be renamed to something like "Rules core Ban support" and description to "Provides Rules conditions and actions on behalf of the Drupal core Ban module.". I also suggest to put this inside a modules directory.

  • TR committed a1477c7 on 8.x-3.x
    Issue #3073653 by TR: WSOD when configuring blocks
    
tr’s picture

Status: Needs review » Fixed

@mjgruta; Thanks. I already took care of the module title when I added the README.txt. I also fixed a few comments in the code. I'm not going to put it in a modules directory for now, but perhaps if we have more than just this one submodule that might be a good idea.

I committed an updated version of #5.

Status: Fixed » Closed (fixed)

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