Page MenuHomePhabricator

Fix a type issue with FormView juggling
ClosedPublic

Authored by epriestley on Feb 24 2014, 8:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Aug 31, 3:10 AM
Unknown Object (File)
Sun, Aug 25, 1:16 PM
Unknown Object (File)
Sun, Aug 18, 11:04 AM
Unknown Object (File)
Sat, Aug 17, 4:39 PM
Unknown Object (File)
Sat, Aug 17, 7:52 AM
Unknown Object (File)
Aug 2 2024, 4:48 PM
Unknown Object (File)
Jul 22 2024, 11:40 PM
Unknown Object (File)
Jul 20 2024, 3:11 AM
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