Enable the tracker view.
Hit preview. The default is Node: Last comment time asc.
In the preview, click the 'last post' link.
The preview box remains, as does the previewed view, but the views configuration UI is gone. Java error console shows nothing.

Comments

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

If a error console returns something then there is a php error.

Without this php error its impossible to fix this bug. You can get this php with

a) your php logs
b) perhaps they error is displayed as the result. Therefore have a look at the result of the request with firebug

esmerel’s picture

Status: Postponed (maintainer needs more info) » Active

That's the nutty thing; there's nothing in the php log either.

Merlin and I looked at this, and something whacky is going on; we're getting different results when we try the same thing. In my case, when I test it now, it pulls up an entirely different view. So we're going to look at it later when he gets a chance.

esmerel’s picture

StatusFileSize
new11.02 KB
new3.08 KB

A basic view I created that does this (780768.txt). I exported it, and imported to 3.x, and it did the second attachment 2xto3ximporterror.txt (technically, that should be a new issue, but I'm attaching it here in case there's something in it that leads to figuring out the problem)

esmerel’s picture

I had another view configured as a block - if I disable that view, the wrong view coming up is no longer a problem, and the sorts work normally, but my configuration screen disappears again. dereine said something about clashing dom ids, so I'm making note of that.

I removed all views that were configured as blocks, but the config ui still disappears with no errors in the page or any logs.

esmerel’s picture

Here's the original URL for editing the view: http://localhost/drupal-test/?q=admin/build/views/edit/sorting

After clicking one of the sortable columns, the url changes tohttp://localhost/drupal-test/?q=admin/build/views/nojs/preview/sorting/d...

esmerel’s picture

This breaks if you're not using clean urls, which cause the code to blow up and degrade to the non-js version.

esmerel’s picture

Assigned: Unassigned » dawehner

16:20] if (url.substring(0, 18) != '/admin/build/views') {
[16:20] That doesn't take into account the clean URL version
[16:22] merlinofchaos: isn't that a js variable for the base url?
[16:22] which could be used here
[16:23] Drupal.settings.basePath
[16:23] no ?q there

dawehner’s picture

Status: Active » Needs work
StatusFileSize
new1.93 KB

Sorry it's night. Here is a first definitive not working version

dawehner’s picture

I have both non-clean urls as well as a basePath different from '/'

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new1.88 KB

This is a working version for me

dawehner’s picture

Assigned: dawehner » esmerel

Assign to esmerel to test the patch

merlinofchaos’s picture

Status: Needs review » Needs work

There is already a Drupal.views.getPath() in base.js -- we either need to use that one, update that one so it can be used, or pick a different function name, because it's very bad to have one overwrite the other.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new879 bytes

Here is a rerole.

Manual testing on www/d6?q=admin/build/views... worked fine.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed to all 6.x branches. I don't htink this is relevant for 7.x

aspedia’s picture

Status: Fixed » Needs work
+        $this->set_display($id);

That little line in the above patch breaks so many little things on my site. it causes breadcrumbs to be shown on pages that did not have any before, it causes noderelationships module to get confused and think that when you have set up a reverse relationship, that the relationship always exists to all posts... These are just things I noticed right away, there might be more, however commenting out the above change, causes all these problems to no longer exist.

All these pages do have blocks and/or attachments or views panes on them, which might be helping bring this issue to light? I should also comment, that these blocks, attachments etc, are all different displays on the same view.

aspedia’s picture

StatusFileSize
new486 bytes

Also managed to fix the problem with the attached patch... Is this a proper solution?

=== modified file 'includes/view.inc'
--- includes/view.inc	2011-01-21 01:55:47 +0000
+++ includes/view.inc	2011-01-27 06:00:01 +0000
@@ -1623,6 +1623,7 @@
 
     $errors = array();
 
+    $current_display = $this->current_display;
     foreach ($this->display as $id => $display) {
       if ($display->handler) {
         if (!empty($display->deleted)) {
@@ -1637,6 +1638,7 @@
       }
     }
 
+    $this->set_display($current_display);
     return $errors ? $errors : TRUE;
   }
 }
aspedia’s picture

Version: 6.x-2.10 » 6.x-2.x-dev

Updating version.

aspedia’s picture

Status: Needs work » Needs review
aspedia’s picture

Assigned: esmerel » Unassigned
dawehner’s picture

Status: Needs review » Fixed

This patch is great. You should have bumped the patch ;), because this really fixes a problem.
Commited to all branches.

Added a test which clarified the bug and showed that the issue will be solved with this patch.

Status: Fixed » Closed (fixed)

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