Page MenuHomePhorge

Herald Transcript of old Tasks: Unhandled Exception: Call to a member function getAppliedTransactionPHIDs() on bool
Closed, ResolvedPublic

Description

Steps to reproduce:

  • Visit a very old Task
  • click on "View Herald Transcript"

Example:

https://we.phorge.it/herald/transcript/268/

What should happen instead:

Not a crash visiting that page.


Reported from Wikimedia by aklapper, Nov 2 2021:

https://phabricator.wikimedia.org/T294860

Event Timeline

valerio.bozzolan triaged this task as Wishlist priority.May 4 2023, 15:08
valerio.bozzolan created this task.
valerio.bozzolan created this object in space S1 Public.

I could reproduce this locally:

  1. As an admin, go to http://phorge.localhost/herald/create/
  2. Select "Maniphest Tasks"
  3. On http://phorge.localhost/herald/create/?adapter=HeraldManiphestTaskAdapter , select "Global Rule"
  4. Under "Conditions", select any of and set the three conditions Description | contains | Internet Archive, Description | contains | archive.org, Description | contains | Wayback Machine.
  5. Under "Action", select Add projects | someProject
  6. Select "Save Rule"
  7. Trigger the rule by creating a new task.
  8. Wait, wait, and wait, then look at the Herald Transcript linked from the task.

Callstack in src/applications/herald/controller/HeraldTranscriptController.php:

  • public function handleRequest(AphrontRequest $request) calls $navigation = $this->newSideNavView($xscript, $view_key);
  • private function newSideNavView(HeraldTranscript $xscript, $view_key) calls $xaction_phids = $this->getTranscriptTransactionPHIDs($xscript);
  • private function getTranscriptTransactionPHIDs(HeraldTranscript $xscript) calls $xaction_phids = $object_xscript->getAppliedTransactionPHIDs();
  • getAppliedTransactionPHIDs() is just a simple getter method.

@valerio.bozzolan Thanks a lot for your help, debugging, deeper investigation! Resolving.