Forgot to mention I'm running:
Radiant 0.9.1 from gem.
After some debugging, turns out its the issue in the navigation_tags
extension that overrides the if_ancestor_or_self tag from standard
tags.
Duh!
Here's the code.
tag "if_ancestor_or_self" do |tag|
Page.benchmark "TAG: if_ancestor_or_self - #{tag.locals.page.url}"
do
tag.expand if tag.globals.actual_page.url.starts_with?
(tag.locals.page.url)
end
end
So the call to tag.globals.actual_page.url should be
tag.globals.page.url to make it this:
tag "if_ancestor_or_self" do |tag|
Page.benchmark "TAG: if_ancestor_or_self - #{tag.locals.page.url}"
do
tag.expand if tag.globals.page.url.starts_with?
(tag.locals.page.url)
end
end
I forked the extension and fixed this.
Now it's working as expected.
On Aug 25, 8:45 am, Jim Gay <[email protected]> wrote:
> On Mon, Aug 23, 2010 at 7:13 PM, swartz <[email protected]> wrote:
> > Strange problem. Attempting to recreate this:
> >http://www.kookdujour.com/blog/details/56
>
> > Whenever I include <r:if_ancestors_or_self>blah</
> > r:if_ancestors_or_self>, it renders it as
>
> > "undefined method `url' for nil:NilClass"
>
> > While using <r:unless_ancestors_or_self> works as expected (i.e.
> > reverse of what I want).
>
> > What is wrong with <r:if_ancestors_or_self> ?
>
> Do you have any other details about the error? Anything from your log?
>
> --
> Jim Gay
> Saturn Flyer LLChttp://www.saturnflyer.com
> 571-403-0338