Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2011 at 23:57 UTC
Updated:
26 May 2011 at 19:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
pglatz commentedI'm not seeing them either (and miss them!) -- no javascript errors reported. views-hide in the wrapper is always set to display none; I don't think the hover script is ever executed.
Comment #2
dawehnerCould it be that this depense highly on the active theme?
We use core contextual links now, so they should provide a sane default.
Comment #3
enkara commentedI have the same problem and I can't see them even in Bartik theme
Comment #4
enkara commentedFor me it's solved, there were no links because the view didn't show any row. But I really think the links should also be shown even if there are no results.
Comment #5
David_Rothstein commentedIt might be possible to fix this via some padding or margins in the CSS... although that would affect the layout of the page so not so good either.
I have a patch at #876772: Better contextual link integration for blocks and pages which doesn't fix this problem directly, but does make it much less of a concern. In the case of blocks and pages, the patch moves the contextual links dropdown to appear in a more appropriate place (attached to the block or page title, not to the view itself). So with that patch, the problem here goes away in most practical situations.
However, it's still not a complete fix because even with that patch, if you choose to override the default behavior and go back to displaying the links right on the view itself, the problem described above would reoccur.
Comment #6
dawehnerThis patch was commited already so is it fixed now?
It would be cool to hear some feedback from you.
Comment #7
David_Rothstein commentedSince Views itself only attaches contextual links to pages and blocks now, I don't think this bug actually surfaces directly anymore.
But the API does still provide the option to attach them to the view itself, and the code to support that is in template_preprocess_views_view(). And maybe there are types of view displays where it would make sense to display them there.
So I think this should remain open. Perhaps it could be downgraded to "minor", though.
Comment #8
dawehnerThis patch adds contextual links back to all displays which doesn't provide some own special behaviour.
Comment #9
dawehnerOkay commited this patch because we need a second beta asap.
@david_rothstein
It would be cool if you could review the patch.
Mh better review the code in git. Fixed some comments there.
Comment #10
David_Rothstein commentedHi @dereine, could you explain more what the purpose of this patch is?
It looks to me like it makes it impossible for anyone to have a view display that doesn't show contextual links (well, at least for displays that use the standard views theming). I wouldn't think that contextual links should always be shown everywhere - e.g., should attachment displays get contextual links when the main display they are attached to already has them?
At first glance, it seems to me like the current behavior (where each view display decides for itself if it wants to opt-in to contextual links) makes more sense.
Anyway, assuming that's the behavior you do actually want, then it looks to me like most of the patch (the parts with $admin_links) isn't necessary. I think you could accomplish it with this part alone:
The Contextual Links module puts the links in $title_suffix, which is already used in views-view.tpl.php, so it doesn't look to me like the $admin_links variable adds anything.
Comment #11
dawehnerWell there should be some default output for the contextual links. There are many display plugins, for example calendar which really should have one.
I'm not sure whether it's good to define it to be disabled by default.
Comment #12
dawehnerWell there should be some default output for the contextual links. There are many display plugins, for example calendar which really should have one.
I'm not sure whether it's good to define it to be disabled by default.
Comment #13
David_Rothstein commentedOK, how about the attached patch then? The key change I made was this:
That way we have contextual links enabled by default, but still give the plugin a way to disable them if they want to.
The rest of the attached patch just removes the other code that was added, since I suggested above that it's not necessary... please let me know if I'm mistaken, though.
Comment #14
dawehnerOh i never wanted to commit my previous patch.
Thanks!
Comment #15
David_Rothstein commentedOK, thanks!
So, the last ten comments or so were a bit of a detour, but the original issue here is still basically valid, I think? It's no longer an issue for the page display (since the contextual links are displayed in the top right corner of the page title), but since attaching the contextual links to the view is now the default behavior used e.g. by Attachment displays, it is an issue there.
In summary: If you create a view of nodes that has an attachment display, the attachment has contextual links for editing the view, but you never see them since they appear directly underneath the contextual links for editing the first node in the view.
Comment #16
merlinofchaos commentedThere's no real need for attachment displays to have contextual links, is there? Maybe we should just have attachments not have them?
Comment #17
David_Rothstein commentedWe could make attachments opt-out of contextual links, yes. The attached patch does that.
The bug might still occur for other (contrib) display plugins that use contextual links though, not sure.
Comment #18
dawehnerGreat.
Commited to 7.x-3.x