Page MenuHomePhabricator

Unhandled Exception accessing Conduit's dashboard.panel.edit: "Attempting to use a panel in a way that requires an implementation, but the panel implementation ("") is unknown to Phabricator."
Open, NormalPublic

Description

Steps:

  1. Go to https://secure.phabricator.com/conduit/
  2. Click on dashboard.panel.edit
  3. End up on https://secure.phabricator.com/conduit/method/dashboard.panel.edit/

Actual outcome:

Unhandled Exception ("Exception")
Attempting to use a panel in a way that requires an implementation, but the panel implementation ("") is unknown to Phabricator.

Expected outcome:
A page that can be used to run a Conduit query. No exception.

Event Timeline

epriestley triaged this task as Normal priority.

D21668 should improve this behavior, although it's not an ideal or complete fix.

The problem with dashboard panels (and some other types of objects) is that there are different kinds of panels (text panels, query panels, chart panels, etc) and each different kind of panel may have different transactions which can be applied to it (for example: you can change the "text" of a Text panel, but not of a Chart panel).

By default, this API documentation page generates an untyped/empty panel that isn't internally valid, which is causing the crash you observed. Since D18822, API methods may instead generate a custom "for documentation" object that Conduit can build documentation for, and D21668 uses that mechanism to generate a valid Text panel instead of an invalid untyped/generic panel. So the page works now, but it always (and only) shows transactions that are specific to the Text panel type.

A better behavior would be for the page to generate all types of the object, and either let you pick them one by one ("show me the transactions I can apply to a Text panel", "show me the transactions I can apply to a Chart panel", etc), and/or show them all at once (show every possible transaction and which types it can apply to). I suspect some kind of one-by-one selector is a bit easier to implement and probably a bit easier to use in most cases.

This is entangled to some degree with T13449, which discusses some similar typing issues when creating objects.