Page MenuHomePhorge

"TypeError: config.datasets is undefined" in Facts when logged out
Open, Needs TriagePublic


Note: I can only reproduce this on and not on my local instance.

Steps to reproduce:

  1. Go to when not being logged in

Expected outcome:

  • either a burndown chart is rendered
  • or some message explains why it is not rendered
  • or you do get redirected to a Login dialog, like on my local test instance which is set to Can Use Application: All Users

Actual outcome:

  • Blank boxes.
  • Opening directly, it shows some payload including \"\u003eYou must log in to take this action.\u003c\/p\u003e\u003c\/div\u00
  • Selecting the View Chart button in the upper right corner does redirect you to a log-in page.
  • Or if the Can Use Application policy at /applications/view/PhabricatorFactApplication/ does not include the currently logged in user, show something else than blank boxes, e.g. in this case, View Chart says You Shall Not Pass: Restricted Application

In Javascript error log:

TypeError: config.datasets is undefined
    setTimeout handler*load

Event Timeline

From a quick glance, looks like the ajax for the graph content is returning a login form or a js redirect request (with status 200), and the handling code in the report page doesn't properly handle that.

The page is labeled "prototype", so I'm not surprised it doesn't work properly in some edge-cases.

In this case, probably the access check for the graph content in incorrect - it should match exactly the rest of the page, which is public here.