HomePhabricator

Fix a type issue with FormView juggling

Description

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.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran, carl

Differential Revision: https://secure.phabricator.com/D8324

Details

Provenance
epriestleyAuthored on
epriestleyPushed on Feb 24 2014, 8:20 PM
Reviewer
btrahan
Differential Revision
D8324: Fix a type issue with FormView juggling
Parents
rP5f95f2b6d51e: Fix variable issue on Conpherence draft saving pathway
Branches
Unknown
Tags
Unknown

Event Timeline