Posted by rooby on January 23, 2012 at 12:42am
7 followers
| Project: | DraggableViews |
| Version: | 7.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | Novice |
Issue Summary
Using latest dev, I have a block view sorted on draggable weight and a page view for sorting using draggable views.
There is no context link on the block view that goes to the sort view.
The sort and display views are both different displays of the same view.
Note: In an older dev version I am using on a different site this works as expected, however that was using two separate views instead of different displays of the same view. When I iget a chance I will update that other site to latest dev and see if the same problem occurs.
Comments
#1
Add tag to issue.
#2
I also get this same problem..
With the dev snapshot from 2011-12-17 draggable views worked fine on some panels I had, displaying view blocks and view content panes, passing in context arguments.
Since I upgraded to 2012-01-21 This stopped working.
I have tried on a complete fresh install of draggableviews, and still can't get it to work... A plain page view works, but panels with context doesn't. So I guess it may be something to do with the new argument handling code.
$arguments[':view_name'] = $setting_view_name;$arguments[':view_display'] = $setting_view_display;
}
+ //THIS WAS ADDED
+ // Arguments passed to view (including exposed filters).
+ $view_arguments = $view_query->view->args;
+ if (isset($view_query->view->exposed_input)) {
+ $view_arguments += $view_query->view->exposed_input;
+ ksort($view_arguments);
+ }
I have attached a patch of the differences, perhaps someone clever can tell which part is causing the problem.
Ignore the diff paths, its set from my drupal install root path.
I'm using a half patched version now, which is confusing, so be very happy if someone can isolate and fix this problem.
#3
I'm sure I will have to investigate and make a patch for this within the next few days for at least one client.
#4
@rooby Is this problem still valid? I have fixed similar issue #1460014: Contextual link is not shown when only "Use contextual links" and "Access draggable views" permissions given. lately. Maybe it fixes this bug as well.
#5
Another issue about contextual link, it is shown only if views_ui module is enabled. Maybe this can be an reason for your case.
Please reopen this issue if the problem still persists.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.
#7
This is still an issue. The problem is that in draggableviews_contextual_links_view_alter the test to see if the link should be displayed is done against $element['element']['#views_contextual_links_info'], but when the view is rendered in a block instead of in a page, #views_contextual_links_info is in $element['#element']['content'].
i.e.
$element['#element']['#views_contextual_links_info']['views_ui']['view_display_id']should be:
$element['#element']['content']['#views_contextual_links_info']['views_ui']['view_display_id']#8
Does attached patch solves the problem?
Truly to say I can't reproduce this bug locally. I have the block that has "Order view" link and it works fine. But I remember had similar issue in the past. So I am happy to apply this patch.
#9
Awesome! That fixed it for me on -dev, so looks like it's good to go. Could this be related to context, perhaps? I wonder if context wraps blocks in an outside container... I'm using context for all of my block placement, so perhaps that could be why you couldn't duplicate it.
Thanks so much!
#10
I confirm this fixes it for me as well.
#11
Thanks for testing. Committed.
#12
Automatically closed -- issue fixed for 2 weeks with no activity.