# Problem with navigation\_tags after upgrade to radiant 0.6.4

**URL:** <https://www.ruby-forum.com/t/problem-with-navigation-tags-after-upgrade-to-radiant-0-6-4/123966>\
**Category:** Radiant CMS\
**Created:** [December 22, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/problem-with-navigation-tags-after-upgrade-to-radiant-0-6-4/123966 "2007-12-22T20:40:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisbotor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f14d63/32.png) [@chrisbotor](https://www.ruby-forum.com/u/chrisbotor)\
**Post date:** [December 22, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/problem-with-navigation-tags-after-upgrade-to-radiant-0-6-4/123966/1 "2007-12-22T20:40:10Z")

</div>

Hi again everyone,  
Now after upgrading i’m realizing my navigation\_tags are not working  
anymore

Here’s a code example

\<r:children:each\>

```
<li>

  <r:if_ancestor_or_self>

   <r:link class="active-cat" />

  </r:if_ancestor_or_self>

</li>

```

\</r:children:each\>

I get this in the output when I call that page

undefined method `url’ for nil:NilClass

It does iterate through the children since I can do \<r:link/\> on its own

This used to work with Radiant 0.6.3, I also got the latest revision of  
the  
navigation tag (r83) but same result.

if I look at navigation\_tags.rb this is the definition

# Inspired by this thread:

# 

[http://www.mail-archive.com/removed\_email\_address@domain.invalid/msg03234.html](http://www.mail-archive.com/removed_email_address@domain.invalid/msg03234.html)

# Author: Marty H.

desc %{

```
Renders the contained element if the current item is an ancestor of 

```

the  
current page or if it is the page itself.

}

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

I’m not a rails coder in any way so any help is appreciated

Thank you

Christian

---

<div class="post-metadata">

**Author:** ![chrisbotor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f14d63/32.png) [@chrisbotor](https://www.ruby-forum.com/u/chrisbotor)\
**Post date:** [December 22, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/problem-with-navigation-tags-after-upgrade-to-radiant-0-6-4/123966/2 "2007-12-22T22:50:04Z")

</div>

Christian,

I haven’t had a chance to test navigation\_tags in 0.6.4. I’ll check it  
out and post a fix if I find one. Meantime, if you figure something  
out, please send me a patch.

- Ryan

---

<div class="post-metadata">

**Author:** ![chrisbotor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f14d63/32.png) [@chrisbotor](https://www.ruby-forum.com/u/chrisbotor)\
**Post date:** [December 22, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/problem-with-navigation-tags-after-upgrade-to-radiant-0-6-4/123966/3 "2007-12-22T23:01:11Z")

</div>

tag.globals.actual\_page was replaced with tag.globals.page in 0.6.4.  
Change that part of the tag and it should work as before.

Cheers,

Sean

---

<div class="post-metadata">

**Author:** ![chrisbotor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f14d63/32.png) [@chrisbotor](https://www.ruby-forum.com/u/chrisbotor)\
**Post date:** [December 23, 2007, 2:05am UTC](https://www.ruby-forum.com/t/problem-with-navigation-tags-after-upgrade-to-radiant-0-6-4/123966/4 "2007-12-23T02:05:33Z")

</div>

Hey guys,

Even with that changed I was never able to get \<r:if\_self\> working BUT  
\<r:if\_ancestor\_or\_self\> seemed to work like it used to.

I mentioned that about a month ago, FYI.

[http://www.ruby-forum.com/topic/132705#new](http://www.ruby-forum.com/topic/132705#new)

Cheers,

–  
Travis B.  
Not sent from my iPhone.
