Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

islandora_bagger_integration/bag_log REST endpoint fails on Drupal 9.4 #30

Open
jefferya opened this issue Jan 24, 2023 · 0 comments
Open

Comments

@jefferya
Copy link
Contributor

jefferya commented Jan 24, 2023

When the islandora_bagger is configured with register_bags_with_islandora: true, the REST call fails on the Drupal side.

I'll submit a PR once I've done further debugging and fixing the third error below.

The three errors I've discovered:

  1. A change in for Drupal 9 required in the @RestResource annotation in IslandoraBaggerIntegrationBagLog.php. Details: https://www.drupal.org/project/drupal/issues/2802677#comment-13947261
 Client error: `POST https://cc-130.cwrc.ca/islandora_bagger_integration/bag_log` resulted in a `406 Not
   Acceptable`
  1. jwt_auth instead of basic_auth (in README)
 {"message":"The used authentication method is not allowed on this route."}
  1. Database insert problem
Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user' cannot be null

Consider in the jwt context change how the user is acquired: src/Plugin/rest/resource/IslandoraBaggerIntegrationBagLog.php L47
'user' => \Drupal::currentUser()->getAccountName(),

jefferya added a commit to jefferya/islandora_bagger_integration that referenced this issue Jan 24, 2023
* reflect the @RestResource annotation change in Drupal 9 https://www.drupal.org/project/drupal/issues/2802677#comment-13947261
* remove reliance on authentication to lookup userid
* tweak documentation to reflect JWT Auth inclusion
* some small grammar fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant