Hello,
I think there is a simple fix to this but I am new to Views and just can't figure out a way to fix this. The bottom line is that my RSS Feed link that is generated for a view I created adds the following "%2" expression to the URL and the browser can not recognize the feed.
Here is what I did
I created a view to list all nodes tagged to a specific taxonomy term. The view creates both a block and a page. For the pageview, I have defined the URL as
"travel/cities". The view has two arguments and one filter.
The first argument is "Taxonomy TermID" and it defualts to "Display all values" I have no title, options or wildcards defined.
The second argument is "RSS: RSS Feed Selector" and it defaults to "Display allvalues" I have no title, options or wildcards defined.
The filter is "Taxonomy Term is all of "my term (cities in this case)" with no option.
THe page view displays fine, however when I click on the RSS feed icon, the URL display %2 and the browser can not dispplay the feed.
Can anyone please help ?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | views-fix-wildcard.patch | 1.08 KB | merlinofchaos |
Comments
Comment #1
merlinofchaos commentedHmm. That %2 has to be coming from somewhere. Can you please export the view and paste it here inside <code> tags? Then set this back to active.
Comment #2
matmasr commentedComment #3
matmasr commentedJust to be more accurate, the URL displays as this
http://www.mysitename/travel/cities/%2A/feed
Thank you so much for your help
Comment #4
catchThis means you've put a * in your path somewhere. You should use $arg rather than * as placeholders for arguments in your views url.
Marking this as fixed, but post back if that's not the issue.
Comment #5
rgraves commentedI have the same problem. I looked at my view and here's what I had for arguments:
Node: Posted Month + Year
- Default set to 'Display All Values'
RSS: RSS Feed Selector
- Default set to 'Display All Values'
- Wildcard set to '*' (without the quotes)
I tried removing the * and replacing it with $arg. I also tried replacing the * with nothing. However the feed URL still wants to be http://www.mydomain.com/news/%2/feed instead of http://www.mydomain.com/news/feed
Comment #6
catcharguments at the end of the url don't need $arg
Try it without any url components except for news and post back.
Comment #7
merlinofchaos commentedTry this: In the 'wildcard' spot for the arguments before the RSS feed, put 'all'. In the wildcard substitution field, put 'All' (capitalized). That should remove the asterisks which are getting urlencoded, unfortunately.
Comment #8
merlinofchaos commentedJust to clarify: The default wildcard is *; but it appears that * gets urlencoded, but if I change that now, then existing views installs could get screwed up when their URLs suddenly change. So I can't 'fix' that. But you can work around it by putting 'all' in the wildcard spot, I believe. In the Wildcard Sub spot, that's what you'll see in the breadcrumb trail if the wildcard is present.
Comment #9
rgraves commentedAdding 'all' and 'All' in the wildcard and wildcard sub spots did not make a difference. I also tried it with nothing in those boxes and it still wants to use the feed URL /news/%2A/feed
Comment #10
merlinofchaos commentedI can confirm that there's a bug with the wildcard substitution there, darnit.
The attached patch fixes it.
Comment #11
matmasr commentedI have no special characters or entries in the argument field and still get the error.
I would like to implement the patch. Can someone please let me know how to incoporate the patch ?
Comment #12
matmasr commentedWhen I compare the patch to the original the only change is to remove this line 854
$args[] = '*';and replace with this
$args[] = $argdata['wildcard'];is this correct ?
Comment #13
merlinofchaos commentedFor more information on applying patches, see http://drupal.org/patch
However, you are correct. Replacing that one line will do it, and is probably easier than applying the patch if you are not already familiar with doing so.
Comment #14
matmasr commentedI made that change, however,the URL generated looks somthing like this
http://www.mysite.net/travel/cities/%252Ffeed
Could the problem be in the "views_taxonomy.inc" file instead ?
Comment #15
merlinofchaos commentedNo, I verified the patch works. Make sure you're putting the wildcard sub on the arguments *prior to* the RSS/feed argument.
Comment #16
matmasr commentedmerlinofchaos,
Thank you so much, your patch does work. You are a great helper. I did have to put 'all' and 'All' in the argument prior to the Rss Feed (which is in my case the taxonomy term ID.
Great job !
Comment #17
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.