- Issue created by @apotek
There appear to have been some recent changes to Blackbaud SKY API.
The major one I am noticing is that now, for the first, time, when I go to admin/config/services/blackbaud/authorize, as I normally do, whenever I need to reauthorize my connection, after successfully logging in to Blackbaud, I get an error message from Blackbaud (see attached screenshot), and the following exception in my logs:
Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException: The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned null. Did you forget to add a return statement somewhere in your controller? in () (line 98 of /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php).
I tried to troubleshoot this myself by looking in blackbaud_sky_api routes file for the controller that corresponds to the blackbaud/oauth path that throws this exception, but none of the paths defined in blackbaud_sky_api.routing.yml is blackbaud/oauth. I then figured out that the default controller was responding to a route path defined in key_value/state.
Sure enough, that controller, does this:
$bb->getAuthCode('init', $_GET['code']);
and does not return anything at all. It seems that controller would need to be modified to provide a Response object.
In addition to this major issue, I also note that the configuration form (/admin/config/services/blackbaud) has links to
- View the OAuth base url just in case. https://apidocs.sky.blackbaud.com/docs/authorization/
- View the API base url just in case. https://apidocs.sky.blackbaud.com/docs/basics/
Both these links now go to 404 pages at Blackbaud.
1. Try to reauthorize with Blackbaud. Recieve error message at Blackbaud and exception thrown at blackbaud/oauth route.
It seems we should add a Response object to the default controller, based on the exception. I am not sure what flavor Response object would be best to return.
Create a merge request at git.drupalcode.org with a potential fix. Discuss. Fix.
Perhaps take the time to update the links in the configuration form.
None that I am aware of.
none.
Active
1.2
Code