In the "Material Properties" of the selected object, the list of shaders is blank in Surface and Volume drop-downs.
While iterating over the list socket_type is always set to -1 for SOCK_SHADER in node_templates
if (!ui_compatible_sockets(item.socket_type, sock->type)) {
continue;
}The patch only fixes the shader type but this might apply to other types too.