Page MenuHomePhabricator

Fix a type issue with FormView juggling
ClosedPublic

Authored by epriestley on Feb 24 2014, 8:03 PM.
Tags
None
Referenced Files
F14057269: D8324.diff
Sun, Nov 17, 1:56 AM
F14045717: D8324.diff
Wed, Nov 13, 9:17 AM
F14006285: D8324.diff
Mon, Oct 28, 5:03 AM
F14004824: D8324.id19798.diff
Sun, Oct 27, 3:18 AM
F13998985: D8324.diff
Thu, Oct 24, 12:10 PM
F13963113: D8324.id19796.diff
Oct 15 2024, 2:03 PM
Unknown Object (File)
Oct 1 2024, 4:09 PM
Unknown Object (File)
Sep 30 2024, 6:04 PM
Subscribers

Details

Reviewers
btrahan
chad
Commits
Restricted Diffusion Commit
rPa31a7809b02e: Fix a type issue with FormView juggling
Summary

When you click the pencil icon in the Maniphest task list, we currently fatal:

Argument 1 passed to PhabricatorCustomFieldList::appendFieldsToForm() must be an instance of AphrontFormView, instance of PHUIFormLayoutView given, called in /core/lib/phabricator/src/applications/maniphest/controller/ManiphestTaskEditController.php on line 576 and defined

This is because we build an AphrontFormView noramlly, but a PHUIFormLayoutView for dialogs, since they don't take a full form (they render their own form tag).

Instead, always build an AphrontFormView and just pull the PHUIFormLayoutView out of it when we're ready to put it in a dialog. This means $form is always the same type of object, and is generally better and makes more sense.

Test Plan

Clicked pencil edit icon in Maniphest task list.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped