Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.11
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2010 at 15:40 UTC
Updated:
16 Dec 2010 at 15:41 UTC
I have the page display path set to node/%/stuff
but when it displays it comes out as node/16/stuff/16
node/16/stuff works exactly the same when typed into the browser, but the "more link" from my block display is going to node/16/stuff/16
I am thinking this is probably written somewhere, but I can't find it anywhere.
Comments
Comment #1
Trunkhorn commentedInteresting, if I use panels to enable the "more" link, it will show node/%/stuff, but then I can't change the text of the more link as far as I can tell.
Comment #2
Trunkhorn commentedI thought content panes might solve my problem, but the trouble remains.
I am slowly creeping into "support leech" territory! :)
Comment #3
merlinofchaos commentedI think for the first one I'd need to see an export of the view that's doing that. It's hard to guess how you've got it configured from what you've provided. I don't think you should need Panels.
What I can say is that it sounds like you somehow have the argument in there twice, which isn't supposed to happen unless you're somehow doing manual argument injection.
Comment #4
Trunkhorn commentedI'm beginning to realize that this is possibly a bug.
As it stands, if you use the "more link" option on a block display, it will add the nid to the end of the page path node/%/something/nid.
If you use the "more link" from the panels config of the block, you get the correct node/%/something.
If you use a content pane, it always uses the "more link" field in the views administration to find the configured name of the "more link". No matter how you try to config between panels and the content pane administration view, there is no way to not make it show as node/%/something/nid.
So what's the common denominator?
Whenever the panel uses its own "more link" on a block, it produces the link without a trailing nid.
Whenever a panel allows the block to create the "more link", it makes the link with a trailing nid.
Whenever you use a content pane, whether through the panel config or the views admin, it will always make a link with a trailing nid, even if you use a path override.
So, it seems whenever the panel relies on views to provide any "more link" content, it will always have a trailing nid, even if it is a content pane that is being created.
Possible solutions:
1. If on the page path override of a view, allow the user to choose to remove the trailing nid if an argument from the url or nid is present.
2. Always allow content panes to not have a trailing nid.
Or whatever someone with actual technical understanding could think up.
Comment #5
Trunkhorn commentedIt seems the issue is that I have Node:nid argument set, which I was using to remove the currently viewed page from the view on that page.
I'm going to keep digging here.
Comment #6
Trunkhorn commentedIt seems that if I remove that Node:nid argument, then all the links are correct.
But if I add it, no matter how I set the argument, whether through the content pane argument input or through the node-id argument form, it still bumps the original nid to the end.
So either I am not using the correct option to remove the current node from the display, or possibly a node:nid and page path issue?
May be in the case of an nid, it shouldn't be considered the type of argument which will bump an nid to the end of the page path link?
Comment #7
merlinofchaos commentedI'd still like a view export so I can see how your view is configured.
Comment #8
Trunkhorn commentedNo problem. It is a simple view that displays a node:title based on the value of a referencefield, in this case to view child nodes.
Comment #9
Trunkhorn commentedI should mention that if I am displaying child content, the Node:nid removal argument isn't necessary...
but when using this view to display sibling content, and I want to remove the current node from the list, then I run into this problem.
I used panels relationship context "node from reference" to hand my block the nid in a nodereference from the currently displayed node.
It seems a content pane doesn't have the direct access to that nodereference nid context like a block does, at least in terms of the selection list.
Possibly the page path needs to recognize when it is being passed an nid that it already has?
Comment #10
merlinofchaos commentedUnfortunately there may not be much that can be done about this. The 'more' link system assumes that the URL needs the arguments, and has no way to tell that it doesn't actually need them.
You might be able to construct the link manually using the views-more--VIEWNAME.tpl.php template file to override the theming of the more link. Then you can construct the link manually and you'll get something working. It's not elegant but this is a longstanding issue with Views that isn't super easy to correct.
Comment #11
Trunkhorn commentedIt is a shame since the link obviously works fine without that final /nid.
Maybe the URL alter people could do something about this from their end? I'll check out if it's a possibility.
Thanks for looking into this!
Comment #12
Trunkhorn commentedActually, since I am a panels user, maybe allowing the panels config "more link" be editable would be a better solution, since the nid:argument of a view doesn't seem to effect it.
I've written an issue for it here:
http://drupal.org/node/1000146