Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
swentel CreditAttribution: swentel commentedActually just figured it out, it's a different problem with oauth code I have running, it's interfering somehow.
Comment #3
chaps2 CreditAttribution: chaps2 at Mirum Agency commentedI'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.
Comment #4
badjava CreditAttribution: badjava at Metasun for Pfizer, Inc. commentedThis 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?
Comment #5
alanpeart CreditAttribution: alanpeart commentedI 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.
Comment #6
AnybodyI can sadly confirm this.
Comment #7
alanyong CreditAttribution: alanyong commentedAny solution for this ? Seems like nobody care this issue.
Comment #8
punch CreditAttribution: punch commented#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;
Comment #9
npcoder CreditAttribution: npcoder as a volunteer commentedI 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.
Comment #10
geek-merlinSo 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...)
Comment #11
AnybodyClosed 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!