Page MenuHomePhorge

Fix call to non-existing getApplication() in PhabricatorDashboardPanelListController
AbandonedPublic

Authored by aklapper on May 16 2024, 11:28.

Details

Summary

PhabricatorDashboardPanelListController twice calls $this->getApplication() which is not defined in this class or any of its parent classes. Thus call existing getCurrentApplication() in great-grandparent class AphrontController instead.

($this->getApplication() was likely incorrectly copied from *SearchEngine classes where that method exists.)

Ref T15844

Test Plan

Carefully read the code and check available methods in its parent classes.

Diff Detail

Repository
rP Phorge
Branch
NEdashboardPanelListController (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1270
Build 1270: arc lint + arc unit

Event Timeline

valerio.bozzolan edited the summary of this revision. (Show Details)

Just try to move the method in PhabricatorDashboardPanelSearchEngine as-is

This revision now requires changes to proceed.May 31 2024, 08:50

The test plan should be:

Visit this page, you finally see a welcome message (the "new user interface") just like in Maniphest:
http://phorge.localhost/dashboard/panel/?nux=1
http://phorge.localhost/maniphest/?nux=1

Visit that page normally. If you have elements, you see them. Otherwise, now you see that welcome message, instead of no results. Just like in Maniphest.
http://phorge.localhost/dashboard/panel/
http://phorge.localhost/maniphest/

Just try to move the method in PhabricatorDashboardPanelSearchEngine as-is

Hi, could you elaborate a bit (which exact method, from which class to which class)? Thanks.

Yup. I noticed that probably the method getNewUserBody() should be just moved from PhabricatorDashboardPanelListController to PhabricatorDashboardPanelSearchEngine. Additional details in T15844.

Sorry again for the confusion, I don't want to create extra work. I will create another patch as clarification. Unfortunate legacy situation.

Nah, appreciated if you think that there is a better / more correct way to fix this which also covers a bigger underlying issue that you found. :)
I guess I should abandon this patch?

I guess I should abandon this patch?

A good captain never abandon its ship (?)

But you have Italian friends, so, abandoning ship, and "lying to the authorities", it's our dirty business - ref: https://en.wikipedia.org/wiki/Francesco_Schettino

Okay I'll just re-arrange the chairs on the ship deck a bit then, double-swear!

Abandoning in favor of D25674