Has anyone had any luck in getting this extension working with radiant 0.8?

I'm getting this error when I try to visit the homepage when it is set as a
Shortcut Finder as per instructions:

NoMethodError (undefined method `include?' for nil:NilClass):
  vendor/extensions/shortcut/app/models/shortcut_finder_page.rb:5:in
`find_by_url'
  radiant (0.8.1) app/models/page.rb:177:in `find_by_url'
  radiant (0.8.1) app/controllers/site_controller.rb:41:in `find_page'
  radiant (0.8.1) app/controllers/site_controller.rb:19:in `show_page'
  radiant (0.8.1) vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in
`process'

shortcut_finder_page.rb:

class ShortcutFinderPage < Page
  def find_by_url(url, live = true, clean = true)
    url = clean_url(url) if clean
    slugged_url = url.gsub!(%r{^/},'').gsub!(%r{/$},'')
    unless slugged_url.include?('/')
      children.find_by_class_name('ShortcutDisplayPage')
    else
      super
    end
  end
end


I noticed there is a call to response::cache in shortcut_display_page.rb
whose removal allows for the displaying of the shortcut pages to work as
intended; it is just that the homepage is causing an error with this line:

    unless slugged_url.include?('/')

If I add && slugged_url.nil? to get around the error it will display the
homepage but will also display all subpages as shortcuts regardless of their
shortcut setting...

Does anyone know how to go about fixing this problem?

Thanks as always,

Dominic
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
List Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Radiant: http://radiantcms.org
Extensions: http://ext.radiantcms.org

Reply via email to