<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #1106: Bugs related to routes arising from API refactor + removal of default routes</title>
    <link>http://localhost/ticket/1106</link>
    <description>&lt;p&gt;
Various bugs I've been encountering:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Autocomplete of tag names no longer works (no longer works on &lt;a class="ext-link" href="http://ckan.net/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://ckan.net/&lt;/a&gt;). Appears to be due to no longer have a routes for apiv2 (i'm seeing failing calls to:  &lt;a class="ext-link" href="http://ckan.net/apiv2/package/autocomplete?callback=callback&amp;amp;incomplete=a"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://ckan.net/apiv2/package/autocomplete?callback=callback&amp;amp;incomplete=a&lt;/a&gt;)
&lt;/li&gt;&lt;li&gt;Incorrect url generated for API in page footer (e.g.  &lt;a class="ext-link" href="http://ckan.net/rest/get_api"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://ckan.net/rest/get_api&lt;/a&gt;) due to use of old 'rest' rather than new 'api'
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Latter issue was masked by existence of 'default' routes:
&lt;/p&gt;
&lt;pre class="wiki"&gt;   map.connect('/{controller}', action='index')
   map.connect('/:controller/{action}')
   map.connect('/{controller}/{action}/{id}')
&lt;/pre&gt;&lt;p&gt;
Having these is, I think, bad practice as it is better to be explicit and we should therefore remove asap.
&lt;/p&gt;
&lt;p&gt;
In addition I think we should be cautious about 'default' routes in core such as:
&lt;/p&gt;
&lt;pre class="wiki"&gt;    map.connect('/api/rest/:register', controller='api', action='list',
        conditions=dict(method=['GET'])
        )
&lt;/pre&gt;&lt;p&gt;
As it makes it harder for extensions to introduce their own APIs (here one could perhaps add something at /api/rest/{my-object} but only by using before_map rather than after_map).
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/1106</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>rgrp</dc:creator>

      <pubDate>Tue, 26 Apr 2011 16:07:49 GMT</pubDate>
      <title>status changed; resolution set</title>
      <link>http://localhost/ticket/1106#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/1106#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
fixed in branch:defect-1106-bugs-with-routing.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>