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 ?

CommentFileSizeAuthor
#10 views-fix-wildcard.patch1.08 KBmerlinofchaos

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Hmm. 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.

matmasr’s picture

Status: Postponed (maintainer needs more info) » Active
  $view = new stdClass();
  $view->name = 'cities_directory';
  $view->description = 'Directory of Websites tagged with term Cities';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Cities';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'node';
  $view->url = 'travel/cities';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->menu = TRUE;
  $view->menu_title = '';
  $view->menu_tab = FALSE;
  $view->menu_tab_weight = '0';
  $view->menu_tab_default = FALSE;
  $view->menu_tab_default_parent = NULL;
  $view->menu_tab_default_parent_type = 'tab';
  $view->menu_parent_tab_weight = '0';
  $view->menu_parent_title = '';
  $view->block = TRUE;
  $view->block_title = 'Cities';
  $view->block_header = '';
  $view->block_header_format = '1';
  $view->block_footer = '';
  $view->block_footer_format = '1';
  $view->block_empty = '';
  $view->block_empty_format = '1';
  $view->block_type = 'list';
  $view->nodes_per_block = '5';
  $view->block_more = TRUE;
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array (
  );
  $view->argument = array (
    array (
      'type' => 'taxid',
      'argdefault' => '2',
      'title' => '',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
    array (
      'type' => 'rss_feed',
      'argdefault' => '2',
      'title' => '',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'term_node',
      'field' => 'tid',
      'operator' => 'AND',
      'options' => '',
      'value' => array (
  0 => '17',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node, term_node);
  $views[$view->name] = $view;
matmasr’s picture

Just to be more accurate, the URL displays as this

http://www.mysitename/travel/cities/%2A/feed

Thank you so much for your help

catch’s picture

Category: bug » support
Status: Active » Fixed

This 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.

rgraves’s picture

Status: Fixed » Active

I 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

catch’s picture

Status: Active » Postponed (maintainer needs more info)

arguments at the end of the url don't need $arg

Try it without any url components except for news and post back.

merlinofchaos’s picture

Try 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.

merlinofchaos’s picture

Just 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.

rgraves’s picture

Status: Postponed (maintainer needs more info) » Active

Adding '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

merlinofchaos’s picture

Title: Views RSS feed for a taxonomy term » Views ignores wildcard in RSS feeds
Category: support » bug
Status: Active » Reviewed & tested by the community
StatusFileSize
new1.08 KB

I can confirm that there's a bug with the wildcard substitution there, darnit.

The attached patch fixes it.

matmasr’s picture

I 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 ?

matmasr’s picture

When 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 ?

merlinofchaos’s picture

For 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.

matmasr’s picture

Status: Reviewed & tested by the community » Needs work

I 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 ?

merlinofchaos’s picture

Status: Needs work » Reviewed & tested by the community

No, I verified the patch works. Make sure you're putting the wildcard sub on the arguments *prior to* the RSS/feed argument.

matmasr’s picture

Status: Reviewed & tested by the community » Fixed

merlinofchaos,

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 !

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.