@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix invalid submit_uri when creating dashboard panels

Summary: When creating dashboard panels, the `submit_uri` is invalid since the panel has not been saved to the database yet (and therefore doesn't have an ID). This resulted in a 404 when trying to submit the form to `/dashboard/panel/edit//`

Test Plan: Created a dashboard panel and the panel was created successfully

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

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

authored by

Toby Hughes and committed by
epriestley
baf4d451 fa278fcb

+5 -1
+5 -1
src/applications/dashboard/controller/PhabricatorDashboardPanelEditController.php
··· 196 196 197 197 // NOTE: We're setting the submit URI explicitly because we need to edit 198 198 // a different panel if we just cloned the original panel. 199 - $submit_uri = $this->getApplicationURI('panel/edit/'.$panel->getID().'/'); 199 + if ($is_create) { 200 + $submit_uri = $this->getApplicationURI('panel/edit/'); 201 + } else { 202 + $submit_uri = $this->getApplicationURI('panel/edit/'.$panel->getID().'/'); 203 + } 200 204 201 205 $policies = id(new PhabricatorPolicyQuery()) 202 206 ->setViewer($viewer)