#8338 [WebUI] Host detail with no assigned ID view makes invalid RPC call
Closed: fixed by frenaud. Opened by carbenium.

Issue

Opening the details facet for a host with no assigned ID view (ipaassignedidview) creates an invalid RPC call on the show_idview endpoint.

Steps to Reproduce

  1. Open host with no assigned ID view
  2. Error logged in web console and httpd log

Actual behavior

Web console error:

{
  "command": {
    "entity": "idview",
    "method": "show",
    "args": [],
    "options": {
      "version": "2.236"
    },
    "suppress_warnings": [],
    "retry": false,
    "notify_globally": true,
    "start_handler": null,
    "end_handler": null,
    "error_message": "Some operations failed.",
    "error_messages": {
      "_key_indicies": {
        "404": 0,
        "911": 1
      },
      "keys": [
        "404",
        "911"
      ],
      "values": [
        "Cannot connect to the server, please check API accesibility (certificate, API, proxy, etc.)",
        "Missing HTTP referer. You have to configure your browser to send HTTP referer header."
      ],
      "length": 2
    },
    "data": {
      "method": "idview_show",
      "params": [
        [],
        {
          "version": "2.236"
        }
      ]
    },
    "request": {
      "url": "/ipa/session/json",
      "data": "{\"method\":\"idview_show\",\"params\":[[],{\"version\":\"2.236\"}]}"
    }
  },
  "context": {
    "url": "/ipa/session/json",
    "type": "POST",
    "isLocal": false,
    "global": true,
    "processData": false,
    "async": true,
    "contentType": "application/json",
    "accepts": {
      "*": "*/*",
      "text": "text/plain",
      "html": "text/html",
      "xml": "application/xml, text/xml",
      "json": "application/json, text/javascript",
      "script": "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
    },
    "contents": {
      "xml": {},
      "html": {},
      "json": {},
      "script": {}
    },
    "responseFields": {
      "xml": "responseXML",
      "text": "responseText",
      "json": "responseJSON"
    },
    "converters": {
      "text html": true
    },
    "flatOptions": {
      "url": true,
      "context": true
    },
    "jsonp": "callback",
    "dataType": "json",
    "data": "{\"method\":\"idview_show\",\"params\":[[],{\"version\":\"2.236\"}]}",
    "dataTypes": [
      "text",
      "json"
    ],
    "crossDomain": false,
    "hasContent": true
  },
  "xhr": {
    "readyState": 4,
    "responseText": "{\"result\": null, \"error\": {\"code\": 3007, \"message\": \"'cn' is required\", \"data\": {\"name\": \"cn\"}, \"name\": \"RequirementError\"}, \"id\": null, \"principal\": \"admin@IPA.TEST\", \"version\": \"4.8.6\"}",
    "responseJSON": {
      "result": null,
      "error": {
        "code": 3007,
        "message": "'cn' is required",
        "data": {
          "name": "cn"
        },
        "name": "RequirementError"
      },
      "id": null,
      "principal": "admin@IPA.TEST",
      "version": "4.8.6"
    },
    "status": 200,
    "statusText": "Success"
  },
  "text_status": "success",
  "error_thrown": {
    "name": "IPA Error 3007: RequirementError",
    "code": 3007,
    "message": "'cn' is required",
    "data": {
      "result": null,
      "error": {
        "code": 3007,
        "message": "'cn' is required",
        "data": {
          "name": "cn"
        },
        "name": "RequirementError"
      },
      "id": null,
      "principal": "admin@IPA.TEST",
      "version": "4.8.6"
    }
  }
}

httpd log:

[Fri May 29 10:20:12.783194 2020] [wsgi:error] [pid 26237:tid 139832964224768] [remote 10.20.4.47:59842] ipa: INFO: [jsonserver_session] admin@IPA.TEST: idview_show(None, version='2.236'): RequirementError

Expected behavior

No error logged

Version/Release/Distribution

e668b61fd2843edc4863d39f9707fd7993571b2e


https://github.com/freeipa/freeipa/pull/4721

master:

  • 7de1a93ce44d3afe582884a6c9c803b5d4614afb WebUI: Fix invalid RPC calls when link widget has no pkey passed

ipa-4-8:

  • 2af2373c57c6828db922008ce1e3b7fd9b3e0da8 WebUI: Fix invalid RPC calls when link widget has no pkey passed

ipa-4-6:

  • e80bd4898a3e01706a544a748140bc67cfd7e940 WebUI: Fix invalid RPC calls when link widget has no pkey passed

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata