Drupal 8.2.x-rc2, local machine, php 5.6, apache 2

After enabling shield and setting a username & password, the popup shows up fine. After giving the right credentials, I'm getting 403 everywhere. Even after clearing caches, closing browser, reopening, same thing.

Not sure what goes on here, hard to tell.
There are some contrib modules enabled, but nothing that should interfere as far as I can see.

Comments

swentel created an issue. See original summary.

swentel’s picture

Status: Active » Closed (works as designed)

Actually just figured it out, it's a different problem with oauth code I have running, it's interfering somehow.

chaps2’s picture

Status: Closed (works as designed) » Active

I've had the same on 2 different sites - in both cases it was due to an incompatibility with the core basic_auth module. Disabling basic_auth fixed the problem.

badjava’s picture

Component: Code » Documentation
Category: Bug report » Task

This seems like a duplicate of #2815945: Make shield work with D8 core basic_auth (1). Since that issue actually discusses how core's basic_auth could co-exist with shield, I think it should supersede this one. Perhaps this issue can simply be a documentation exercise updating the readme and project page?

alanpeart’s picture

I enabled Shield and now I can't access any pages. I am also unable to remove shield - if I simply delete the module folder, I get fatal PHP errors. Drupal 8 has made it almost impossible to disable modules manually via the database too.

Edit: I was able to figure out how to get rid of the module, it involved manual deletion, a lot of cache clearing and deletion of lines in the config table. It appears the Drupal 8 basic auth setup also makes it impossible to use directory password protection (e.g. from cpanel) so I will look for a solution in core rather than Shield! Thanks.

Anybody’s picture

I can sadly confirm this.

alanyong’s picture

Any solution for this ? Seems like nobody care this issue.

punch’s picture

#2842858: Basic Auth module conflicts with server-level "Site Lock" implementations patch #17 fixed the problem for me.

#5 you can disable shield modual by adding this to your settings.php:
$config['shield.settings']['credentials']['shield']['user'] = NULL;

npcoder’s picture

I enabled Shield module (shield-8.x-1.4) with configuration. After providing login in credentials, it shows 403 'Page access denied.' error. My PHP version is 7.3.13 and the Drupal version is 8.8.4.

Edit: Resolved the solution
It was due to basic_auth core module.
I disable the 'basic_auth' using Drush then it worked.
drush pm:uninstall basic_auth

But, I'm not sure disabling 'basic_auth' might result in any consequences.

Thanks @chaps2 for your suggestion.

geek-merlin’s picture

Title: After enabling all pages are access denied » After enabling shield AND basic_auth, all pages are access denied
Category: Task » Bug report
Priority: Major » Normal

So does this happen *without* basic_auth? With basic_auth, is there anything we can do? I think the best is a hook_requirements that informs that these modules are not compatible. Patches appreciated. (Or is this a dup? I remember dimly...)

Anybody’s picture

Status: Active » Closed (duplicate)

Closed as duplicate of #2815945: Make shield work with D8 core basic_auth (1). If anyone should experience these problems WITHOUT the basic_auth module, please reopen!