If you change your view via contextual links you should get a redirect to the original page,
sadly this is broken at the moment.

Warning: Invalid argument supplied for foreach() in views_ui_edit_view_form_submit() (line 627 of core/modules/views/views_ui/admin.inc).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Active » Needs review
FileSize
1.35 KB

There has been another notice after the initial warning:

Warning: Invalid argument supplied for foreach() in views_ui_edit_view_form_submit() (line 627 of core/modules/views/views_ui/admin.inc).
Notice: Trying to get property of non-object in views_ui_edit_view_form_submit() (line 634 of core/modules/views/views_ui/admin.inc).

It seems to be we need a) more tests and b) more manual tests

tim.plunkett’s picture

Project: VDC » Views (for Drupal 7)
Version: » 8.x-3.x-dev
Issue tags: +Needs tests

Moving back for now :(

Status: Needs review » Needs work

The last submitted patch, vdc-1807632-1.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
FileSize
1.27 KB

Rerolled @dawehner's patch.

tim.plunkett’s picture

Status: Needs review » Needs work

Needs tests. But looks good.

dawehner’s picture

Status: Needs work » Needs review
FileSize
1.8 KB

Just started with writing tests, sadly my drupal installation is broken and i have to finish before 12pm
so this is just the current work, but it seems to make sense.

Status: Needs review » Needs work

The last submitted patch, views-1807632-tests.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
1.95 KB
3.49 KB

LOL
Writing tests while falling into sleep tststs

Wow this was way harder then expected, see

        // @fixme For whatever reason drupal_goto is still using $_GET.
        // @see http://drupal.org/node/1668866
        unset($_GET['destination']);
dawehner’s picture

Forgot to attach the yml file.

tim.plunkett’s picture

+++ b/lib/Drupal/views/Tests/UI/RedirectTest.phpundefined
@@ -0,0 +1,49 @@
+    $this->assertUrl($new_path, array(), 'Make sure the user got redirected to the expected page after changing the url of a page display.');
+  }
+}
diff --git a/tests/views_test_config/config/views.view.test_redirect_view.yml b/tests/views_test_config/config/views.view.test_redirect_view.yml

Missing blank line at end of class

+++ b/tests/views_test_config/config/views.view.test_redirect_view.ymlundefined
@@ -0,0 +1,80 @@
+uuid: 71f29bbe-d9d5-4fb5-9c2e-469ee7af0beb

Are we putting UUIDs in test views?

+++ b/views_ui/admin.incundefined
@@ -624,15 +624,20 @@ function views_ui_edit_view_form_submit($form, &$form_state) {
+        // @fixme For whatever reason drupal_goto is still using $_GET.
+        // @see http://drupal.org/node/1668866

@todo please, not @fixme

dawehner’s picture

FileSize
5.41 KB

Thanks for the review!

Fixed the issues.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community

I would say this looks good to go now.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-3.x and the vdc sandbox

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