The nodejs_requirements() function calls Nodejs::sendMessage(), and process the result as if it was the object returned by drupal_http_request. This is not the case anymore, as we process http_requests through Nodejs::httpRequest() method.
Right now, if there's not an error, but the Node server is not running, Nodejs::httpRequest() will return FALSE, which will make the following code to run the "else" clause:
if (isset($response->error)) {
$result = array(
'value' => check_plain($response->error),
'severity' => REQUIREMENT_ERROR,
);
}
else {
$result = array(
'value' => check_plain($response->status_message),
'severity' => REQUIREMENT_OK,
);
}There, it will try to access $response->status_message, but since $response is a boolean, it will cause a WSOD, as it tries to access a property on a non-object variable.
The patch attached fixes that, by adapting the response to the new way of processing requests / responses to / from the Nodejs server.
| Comment | File | Size | Author |
|---|---|---|---|
| nodejs_requirements_request_fix.patch | 1.32 KB | slv_ |
Comments
Comment #1
Anonymous (not verified) commentedthis looks good to go to me.
as an aside, we could do a lot more here, by trying to do the whole loop.
basically, pushing some JS to this page as well, and throwing some errors if we can't open an authenticated socket, but this can be a follow up issue.
Comment #2
slv_ commentedThat makes sense to me. Happy to look into it when time allows! ;D.
Will commit this then.
Comment #3
slv_ commentedCommitted and pushed!