- Issue created by @jrb
- πΊπΈUnited States jrb Raleigh-Durham Area, NC, USA
I was able to create a
hook_update_n()
function to add the missing entities, but we're now getting this error when the user is redirected back to the site:https://example.edu/basicshib/login?after_login=/home
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. Valid plugin IDs for Drupal\basicshib\Plugin\BasicShibPluginManager are: grouper_default in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
- Merge request !13Issue #3522338: Add hook_update_n() to install entities added in 3.0 so module can be upgraded. β (Open) created by jrb
- πΊπΈUnited States jrb Raleigh-Durham Area, NC, USA
With this change, we were able to upgrade to the 3.0 version.
- πΊπΈUnited States athrylith
Several updates and fixes have been added, that should resolve the upgrading from versions 2 to 3. If you are still experiencing problems or have any feature requests please let us know.
- πΊπΈUnited States jrb Raleigh-Durham Area, NC, USA
Upgrading from 2.0.3 to 3.0.11 still does not work for the same reason.
The existing upgrade process does not install those new entities. This can be done by adding a new
hook_update_n()
per the MR:https://git.drupalcode.org/project/basicshib/-/merge_requests/13/diffs
Thanks, jrb for noting this and providing an interim solution!
I can confirm that upgrading from 2.0.3 to 3.0.11 does not work properly, just as you noted, and your MR (MR!13) resolves the issue perfectly.
Thanks again!
An addendum to my previous comment, as I seem to have spoken a bit prematurely.
The additional update hook in MR!13 does indeed allow you to update basicshib from 2.x to 3.x, and subsequently access features like the Extend->Uninstall admin page, but in our installation(s), the actual Shib login process would not complete properly.
When we logged in using basicshib's Shib login link, we could authenticate to the shib provider, but the basicshib module failed to pass the login forward, resulting in a 503 screen on the front-end, and two dblog error messages in the admin UI. One of the dblog messages was identical to what @jrb reported (and then struckthrough) in comment #2:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. Valid plugin IDs for Drupal\basicshib\Plugin\BasicShibPluginManager are: grouper_default in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
...and the other was a PHP Warning:
Warning: Undefined array key "grouper" in Drupal\basicshib\AuthorizationHandler->__construct() (line 70 of modules/contrib/basicshib/src/AuthorizationHandler.php)
I tried to downgrade the basicshib module to 2.0.3 (and reverting the schema version to 8000) and then upgrade again to 3.0.11, applying the updatedb updates, and also toggling on and off the grouper-enabled option in the config UI, but nothing seemed to fix those errors.
The only solution I could find was to manually insert in
config/sync/basicshib.settings.yml
the following line in the "plugins
" section (taken frombasicshib/config/install/basicshib.settings.yml
):grouper: grouper_default
Once that entry was imported into Drupal's config, I was able to Shib-authenticate properly using the basicshib module.
It seems as if the update-hook that updates the auth-filters is missing the ability to add the grouper_default grouper plugin as well?
Also, and this may not be important, but I also noticed that the post-update-hook
config/sync/basicshib.settings.yml
config had the following entry:shibboleth_enabled: null
... but the
basicshib/config/install/basicshib.settings.yml
config file has this entry as:shibboleth_default_login: shibboleth_enabled: false
I chose to replace the former entry with the latter entry in our config, but I didn't see any difference on the installation.