Page MenuHomePhorge

Fix call to undefined method PhrictionDocumentTitleTransaction::renderHandleLink()
Needs ReviewPublic

Authored by aklapper on Jul 28 2024, 16:29.

Details

Reviewers
mainframe98
Group Reviewers
O1: Blessed Committers
Summary

PhrictionDocumentTitleTransaction calls $this->renderHandleLink().
PhabricatorApplicationTransaction defines that method public function renderHandleLink($phid).
PhrictionDocumentTitleTransaction extends PhrictionDocumentVersionTransaction extends PhrictionDocumentTransactionType extends PhabricatorModularTransactionType extends Phobject. No PhabricatorApplicationTransaction in that ancestor tree. Thus this call will fail.
Thus replace renderHandleLink() with renderHandle() which accepts a PHID as its parameter (credits to mainframe98 for finding out).

Test Plan

Unclear how to trigger via the UI, so run static code analysis and read/grep the code.

Diff Detail

Repository
rP Phorge
Branch
phrictionTitleTrans
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1763
Build 1763: arc lint + arc unit

Event Timeline

mainframe98 subscribed.

This doesn't seem correct. renderObject doesn't take any arguments. I suspect the intention was renderHandle, as that method takes a PHID, which the metadata key mentions.

src/applications/phriction/xaction/PhrictionDocumentTitleTransaction.php
50
This revision now requires changes to proceed.Mon, Mar 3, 19:04

Ah, thanks, that makes more sense, indeed. (I dislike changes that have an unclear reproduction path.)

Replace renderHandleLink() with renderHandle() and not renderObject(), as rightfully pointed out by mainframe98

I haven't the foggiest how this transaction is supposed to use its stub variant; attempting to create a document at /w/parent/child causes an error about /w/parent/ being required.