Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Views Data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Mar 2008 at 22:51 UTC
Updated:
20 Sep 2008 at 17:49 UTC
- Fresh Drupal 5.7 install
- Created page called some stories with URL /somestories
- Created 2 new story nodes
- Created Block View, selecting node title and node created date, and NID as argument
- Configured block to be Content Bottom and assigned to /somestories page
www.example.com/somestories - works great
www.example.com/somestories/2 - where 2 is my node id returns a Page Not Found
Are arguments not meant to work with block views, or am I missing something that's probably staring me in the face in the documentation?
Thanks!
Comments
Comment #1
e-charity commentedSorry - forgot to mention that I have defined Empty Text, which is not getting displayed, so it seems as though the View gets bypassed completely with the argument.
Comment #2
merlinofchaos commentedBlocks are unable to receive arguments. The problem is that blocks have no way of knowing what the arguments to the page even where. You have to use the PHP ARgument code to try and pull arguments from the URL.
Comment #3
e-charity commentedThanks merlin - I tried putting in some argument handling code, but it's not even executing that code. I'm sure I've got something set up wrong, but can't pin it down.
First, I tried leaving the argument setting (i.e. the Node Id as an argument) in the view, plus adding the argument block - still got page not found.
Then I tried removing the argument I had added, and just had a print statement in the argument handling code, but it still didn't get called.
What's really confusing me is that most of my Drupal pages allow me to put anything after the primary clean urls (e.g. www.example.com/mystories - if I add /blah to the end of that, Drupal doesn't care). In the case of this page that has the block view assigned to it, anything after the initial URL alias results in a Page Not Found.
Any ideas?
Comment #4
e-charity commentedI should add what I'm actually trying to accomplish.
I have a data set created with a view, and I initially modified the template.php function (created with the Theme Wizard) to display some filter settings at the top of the page - of course, if the selection of one of those filters results in no data, then the filter disappears.
What I was trying to do was combine a page view that produced the filter (using arguments) with the block view (data) assigned to the content area which utilizes the same arguments.
Perhaps I'm going about this the completely wrong way?
Comment #5
sunSorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support.
If you were able to solve this issue on your own in the meantime, you might want to add the involved steps to this closed issue, so other users searching for a similar solution might find it.