Problem/Motivation

Proposed resolution

Remaining tasks

User interface changes

API changes

Comments

yesct’s picture

yesct’s picture

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new46.6 KB

Let's do it.

Status: Needs review » Needs work

The last submitted patch, 3: 2305023-cancel_route-3.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new1.61 KB
new47.14 KB

Let's see.

Status: Needs review » Needs work

The last submitted patch, 5: 2305023-cancel_route-5.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new47.7 KB
new1.28 KB

Let's see again.

Status: Needs review » Needs work

The last submitted patch, 7: cancel_route-2305023-6.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new47.78 KB
new1.04 KB

There we go.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/node/src/Form/NodeRevisionRevertForm.php
@@ -67,7 +68,8 @@ public function getQuestion() {
-  public function getCancelRoute() {
+  public function getCancelUrl() {
+    return new Url('node.revision_overview', array('node' => $this->revision->id()));

@@ -91,8 +93,6 @@ public function buildForm(array $form, array &$form_state, $node_revision = NULL
-    // @todo Convert to getCancelRoute() after http://drupal.org/node/1863906.
-    $form['actions']['cancel']['#href'] = 'node/' . $this->revision->id() . '/revisions';

Thank you!

catch’s picture

Status: Reviewed & tested by the community » Needs review

Looks good apart from:

    watchdog('contact', 'Category %label has been deleted.', array('%label' => $this->entity->label()), WATCHDOG_NOTICE);
-    $form_state['redirect_route'] = $this->getCancelRoute();
+    $form_state['redirect_route'] = $this->getCancelUrl();
   }

Not $form_state['redirect_url'] then?

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Opened up a follow up https://www.drupal.org/node/2309039 given that this issue is just about Confirm forms, not abouta ll forms and all its various instances of redirects.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Needs to change MenuLinkContentDeleteForm too

dawehner’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new48.36 KB
new591 bytes

.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +Needs change record updates

Need to update https://www.drupal.org/list-changes/published/drupal?keywords_descriptio...

And can this issue be added to those CR's. Thanks.

Committed 59c3c97 and pushed to 8.x. Thanks!

  • alexpott committed 59c3c97 on 8.x
    Issue #2305023 by dawehner: Fixed Rename getCancelRoute to getCancelUrl.
    
dawehner’s picture

Updated those. Thank you for linking.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.