Re: [Radiant] TagError with aggregate:each in v1.1.1

2013-01-15 Thread Mohit Sindhwani

Thanks, John...

On 15/1/2013 5:12 AM, john wrote:

r:aggregate paths='/about; /articles'
 r:children:each
  r:title/
 /r:children:each
/r:aggregate

and

r:aggregate paths=/about; /articles
 r:children:count/
/r:aggregate



The above works fine!  You found  the problem!

In my case, the problem was that Line 2 (not Line 1):

1 r:aggregate paths=/stage/utk/common;/stage/utk
2 r:aggregate:children:count /
3 /r:aggregate

Line 2 should just be r:children:count, as you pointed out!

Best Regards,
Mohit.




Re: [Radiant] TagError with aggregate:each in v1.1.1

2013-01-15 Thread Jim Gay
The code should work with r:aggregate:each paths=...
But obviously something is wrong.

There are (or should be) 2 ways to use the aggregate tag.

- to collect a group of pages to iterate
- to collect a group of pages to iterate their children

So both of these bits *should* work

r:aggregate paths=...
  r:each... each of the aggregated pages /r:each
  r:children:each ... each of the children of aggregated pages
/r:children:each
/r:aggregate

-Jim

On Tue, Jan 15, 2013 at 8:18 AM, Mohit Sindhwani t...@onghu.com wrote:
 Thanks, John...

 On 15/1/2013 5:12 AM, john wrote:

 r:aggregate paths='/about; /articles'
  r:children:each
   r:title/
  /r:children:each
 /r:aggregate

 and

 r:aggregate paths=/about; /articles
  r:children:count/
 /r:aggregate


 The above works fine!  You found  the problem!

 In my case, the problem was that Line 2 (not Line 1):

 1 r:aggregate paths=/stage/utk/common;/stage/utk
 2 r:aggregate:children:count /
 3 /r:aggregate

 Line 2 should just be r:children:count, as you pointed out!

 Best Regards,
 Mohit.





-- 
Write intention revealing code #= http://www.clean-ruby.com

Jim Gay
Saturn Flyer LLC
571-403-0338


Re: [Radiant] TagError with aggregate:each in v1.1.1

2013-01-15 Thread Mohit Sindhwani

On 15/1/2013 10:01 PM, Jim Gay wrote:

The code should work with r:aggregate:each paths=...
But obviously something is wrong.


Ya, this doesn't work for me right now.


There are (or should be) 2 ways to use the aggregate tag.

- to collect a group of pages to iterate
- to collect a group of pages to iterate their children

So both of these bits *should* work

r:aggregate paths=...
   r:each... each of the aggregated pages /r:each
   r:children:each ... each of the children of aggregated pages
/r:children:each
/r:aggregate


Yep, these work!

For me, the earlier fault with r:aggregate paths='..' was that the 
next line was


r:aggregate:children:count /
(note the aggregate before children) - after changing it to 
r:children:count, it worked fine.



Best Regards,
Mohit.



Re: [Radiant] TagError with aggregate:each in v1.1.1

2013-01-14 Thread Jim Gay
Benito,

Try putting the paths inside the aggregate like this:

r:aggregate paths=...r:each...

I'd like to rework the way tags share information, but for now that
should do it.

On Sat, Jan 12, 2013 at 2:31 PM, Benito Torres radi...@mv.so36.net wrote:
 Hi,

 in radiant-1.1.1 (radius-0.7.3) this snippet:

   r:aggregate:each paths=/
 lir:link //li
   /r:aggregate:each

 results in a TagError (trace below):

   `aggregate' tag must contain a `paths' or `urls' attribute.


 I've been trying to debug this but got stuck somewhere in radius. I only
 can say that the snippet string is loaded from the database and fed to
 radius correctly and the error message comes from the
 aggregate-tag-block in app/models/standard_tag. What happens in between
 and where the paths-attribute is lost I unfortunately fail to understand.

 Could someone help me, please?


 I'm running radiant-1.1.1 on ruby 1.8.7-p370 (via rbenv on Archlinux),
 set up as 'styled blog' with no extra extensions installed.

 Currently I'm helping myself with multiple find-tags, but that's ugly.
 If someone has another suggestions how to iterate over a manually
 selected set of pages I'd be very interested, too!


 Best wishes,
  Benito



 The trace:

 StandardTags::TagError (`aggregate' tag must contain a `paths' or `urls' 
 attribute.):
   radiant (1.1.1) app/models/standard_tags.rb:1291:in `required_attr'
   radiant (1.1.1) app/models/standard_tags.rb:345:in `tag:aggregate'
   radiant (1.1.1) lib/radiant/taggable.rb:39:in `call'
   radiant (1.1.1) lib/radiant/taggable.rb:39:in `render_tag'
   radiant (1.1.1) app/models/page_context.rb:10:in `initialize'
   radius (0.7.3) lib/radius/context.rb:62:in `call'
   radius (0.7.3) lib/radius/context.rb:62:in `render_tag'
   radius (0.7.3) lib/radius/context.rb:101:in `stack'
   radius (0.7.3) lib/radius/context.rb:61:in `render_tag'
   radiant (1.1.1) app/models/page_context.rb:25:in `render_tag'
   radius (0.7.3) lib/radius/context.rb:57:in `render_tag'
   radiant (1.1.1) app/models/page_context.rb:25:in `render_tag'
   radius (0.7.3) lib/radius/parser.rb:58:in `stack_up'
   radius (0.7.3) lib/radius/parse_tag.rb:12:in `call'
   radius (0.7.3) lib/radius/parse_tag.rb:12:in `to_s'
   radius (0.7.3) lib/radius/utility.rb:32:in `array_to_s'
   radius (0.7.3) lib/radius/parser.rb:31:in `parse'
   radius (0.7.3) lib/radius/parse_tag.rb:12:in `call'
   radius (0.7.3) lib/radius/parse_tag.rb:12:in `to_s'
   radius (0.7.3) lib/radius/parser.rb:34:in `parse'
   radiant (1.1.1) app/models/page.rb:367:in `parse'
   radiant (1.1.1) app/models/page.rb:372:in `parse_object'
   radiant (1.1.1) app/models/page.rb:175:in `render_snippet'
   
 /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/gems/1.8/gems/radiant-snippets-extension-1.1.0/app/models/snippet_tags.rb:28:in
  `tag:snippet'
   radiant (1.1.1) lib/radiant/taggable.rb:39:in `call'
   radiant (1.1.1) lib/radiant/taggable.rb:39:in `render_tag'
   radiant (1.1.1) app/models/page_context.rb:10:in `initialize'
   radius (0.7.3) lib/radius/context.rb:62:in `call'
   radius (0.7.3) lib/radius/context.rb:62:in `render_tag'
   radius (0.7.3) lib/radius/context.rb:101:in `stack'
   radius (0.7.3) lib/radius/context.rb:61:in `render_tag'
   radiant (1.1.1) app/models/page_context.rb:25:in `render_tag'
   radius (0.7.3) lib/radius/parser.rb:53:in `stack_up'
   radius (0.7.3) lib/radius/parse_tag.rb:12:in `call'
   radius (0.7.3) lib/radius/parse_tag.rb:12:in `to_s'
   radius (0.7.3) lib/radius/utility.rb:32:in `array_to_s'
   radius (0.7.3) lib/radius/parser.rb:31:in `parse'
   radius (0.7.3) lib/radius/parse_tag.rb:12:in `call'
   radius (0.7.3) lib/radius/parse_tag.rb:12:in `to_s'
   radius (0.7.3) lib/radius/parser.rb:34:in `parse'
   radiant (1.1.1) app/models/page.rb:367:in `parse'
   radiant (1.1.1) app/models/page.rb:372:in `parse_object'
   radiant (1.1.1) app/models/page.rb:159:in `render'
   radiant (1.1.1) app/models/page.rb:128:in `process'
   radiant (1.1.1) app/controllers/site_controller.rb:86:in `process_page'
   radiant (1.1.1) app/controllers/site_controller.rb:23:in `show_page'
   
 /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/gems/1.8/gems/compass-rails-1.0.3/lib/compass-rails/railties/2_3.rb:9:in
  `process'
   sass (3.2.5) lib/sass/./sass/plugin/rack.rb:54:in `call'
   
 /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/httpserver.rb:104:in
  `service'
   
 /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/httpserver.rb:65:in
  `run'
   /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:173:in 
 `start_thread'
   /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:162:in 
 `start'
   /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:162:in 
 `start_thread'
   /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:95:in 
 `start'
   /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:92:in 
 `each'
   

Re: [Radiant] TagError with aggregate:each in v1.1.1

2013-01-14 Thread Mohit Sindhwani

Hi Jim,


On 15/1/2013 12:27 AM, Jim Gay wrote:

Benito,

Try putting the paths inside the aggregate like this:

r:aggregate paths=...r:each...

I'd like to rework the way tags share information, but for now that
should do it.


I was trying to see if I could help, but I actually got the same error for:


r:aggregate paths=/stage/utk/common;/stage/utk
r:aggregate:children:count /
/r:aggregate

==
`aggregate’ tag must contain a `paths’ or `urls’ attribute.

Not sure what the cause is...

What's the best way to try stuff? Would it be best to freeze radiant 
locally to the project and then try to edit that source code to see what 
the problem is?


Best Regards,
Mohit.



Re: [Radiant] TagError with aggregate:each in v1.1.1

2013-01-14 Thread Jim Gay
On Mon, Jan 14, 2013 at 11:46 AM, Mohit Sindhwani t...@onghu.com wrote:
 Hi Jim,

 On 15/1/2013 12:27 AM, Jim Gay wrote:

 Benito,

 Try putting the paths inside the aggregate like this:

 r:aggregate paths=...r:each...

 I'd like to rework the way tags share information, but for now that
 should do it.


 I was trying to see if I could help, but I actually got the same error for:


 r:aggregate paths=/stage/utk/common;/stage/utk
 r:aggregate:children:count /
 /r:aggregate

 ==

 `aggregate’ tag must contain a `paths’ or `urls’ attribute.

 Not sure what the cause is...

 What's the best way to try stuff? Would it be best to freeze radiant locally
 to the project and then try to edit that source code to see what the problem
 is?


Interesting. We should have tests that cover this.
Would either of you mind making an issue on github for this
https://github.com/radiant/radiant/issues


--
Write intention revealing code #= http://www.clean-ruby.com

Jim Gay
Saturn Flyer LLC
571-403-0338


Re: [Radiant] TagError with aggregate:each in v1.1.1

2013-01-14 Thread john
r:aggregate paths='/about; /articles'
 r:children:each
  r:title/
 /r:children:each
/r:aggregate

and

r:aggregate paths=/about; /articles
 r:children:count/
/r:aggregate

work on the demo site. inside the aggregate tag you have a collection that 
you still the use the children tags.

On Monday, January 14, 2013 2:04:25 PM UTC-6, Jim Gay wrote:

 On Mon, Jan 14, 2013 at 11:46 AM, Mohit Sindhwani 
 te...@onghu.comjavascript: 
 wrote: 
  Hi Jim, 
  
  On 15/1/2013 12:27 AM, Jim Gay wrote: 
  
  Benito, 
  
  Try putting the paths inside the aggregate like this: 
  
  r:aggregate paths=...r:each... 
  
  I'd like to rework the way tags share information, but for now that 
  should do it. 
  
  
  I was trying to see if I could help, but I actually got the same error 
 for: 
  
  
  r:aggregate paths=/stage/utk/common;/stage/utk 
  r:aggregate:children:count / 
  /r:aggregate 
  
  == 
  
  `aggregate’ tag must contain a `paths’ or `urls’ attribute. 
  
  Not sure what the cause is... 
  
  What's the best way to try stuff? Would it be best to freeze radiant 
 locally 
  to the project and then try to edit that source code to see what the 
 problem 
  is? 
  

 Interesting. We should have tests that cover this. 
 Would either of you mind making an issue on github for this 
 https://github.com/radiant/radiant/issues 


 -- 
 Write intention revealing code #= http://www.clean-ruby.com 

 Jim Gay 
 Saturn Flyer LLC 
 571-403-0338 



Re: [Radiant] TagError with aggregate:each in v1.1.1

2013-01-14 Thread Benito Torres
Hello Jim, list,

On Mon, Jan 14, 2013 at 11:27 (-0500), Jim Gay wrote:
 Try putting the paths inside the aggregate like this:
 
 r:aggregate paths=...r:each...

That works, thank you very much for the hint!

Do you still want that issue in the tracker?


Best wishes,
 Benito


[Radiant] TagError with aggregate:each in v1.1.1

2013-01-12 Thread Benito Torres
Hi,

in radiant-1.1.1 (radius-0.7.3) this snippet:

  r:aggregate:each paths=/
lir:link //li
  /r:aggregate:each

results in a TagError (trace below):

  `aggregate' tag must contain a `paths' or `urls' attribute.


I've been trying to debug this but got stuck somewhere in radius. I only
can say that the snippet string is loaded from the database and fed to
radius correctly and the error message comes from the
aggregate-tag-block in app/models/standard_tag. What happens in between
and where the paths-attribute is lost I unfortunately fail to understand.

Could someone help me, please?


I'm running radiant-1.1.1 on ruby 1.8.7-p370 (via rbenv on Archlinux),
set up as 'styled blog' with no extra extensions installed.

Currently I'm helping myself with multiple find-tags, but that's ugly.
If someone has another suggestions how to iterate over a manually
selected set of pages I'd be very interested, too!


Best wishes,
 Benito



The trace:

StandardTags::TagError (`aggregate' tag must contain a `paths' or `urls' 
attribute.):
  radiant (1.1.1) app/models/standard_tags.rb:1291:in `required_attr'
  radiant (1.1.1) app/models/standard_tags.rb:345:in `tag:aggregate'
  radiant (1.1.1) lib/radiant/taggable.rb:39:in `call'
  radiant (1.1.1) lib/radiant/taggable.rb:39:in `render_tag'
  radiant (1.1.1) app/models/page_context.rb:10:in `initialize'
  radius (0.7.3) lib/radius/context.rb:62:in `call'
  radius (0.7.3) lib/radius/context.rb:62:in `render_tag'
  radius (0.7.3) lib/radius/context.rb:101:in `stack'
  radius (0.7.3) lib/radius/context.rb:61:in `render_tag'
  radiant (1.1.1) app/models/page_context.rb:25:in `render_tag'
  radius (0.7.3) lib/radius/context.rb:57:in `render_tag'
  radiant (1.1.1) app/models/page_context.rb:25:in `render_tag'
  radius (0.7.3) lib/radius/parser.rb:58:in `stack_up'
  radius (0.7.3) lib/radius/parse_tag.rb:12:in `call'
  radius (0.7.3) lib/radius/parse_tag.rb:12:in `to_s'
  radius (0.7.3) lib/radius/utility.rb:32:in `array_to_s'
  radius (0.7.3) lib/radius/parser.rb:31:in `parse'
  radius (0.7.3) lib/radius/parse_tag.rb:12:in `call'
  radius (0.7.3) lib/radius/parse_tag.rb:12:in `to_s'
  radius (0.7.3) lib/radius/parser.rb:34:in `parse'
  radiant (1.1.1) app/models/page.rb:367:in `parse'
  radiant (1.1.1) app/models/page.rb:372:in `parse_object'
  radiant (1.1.1) app/models/page.rb:175:in `render_snippet'
  
/home/user/.rbenv/versions/1.8.7-p370/lib/ruby/gems/1.8/gems/radiant-snippets-extension-1.1.0/app/models/snippet_tags.rb:28:in
 `tag:snippet'
  radiant (1.1.1) lib/radiant/taggable.rb:39:in `call'
  radiant (1.1.1) lib/radiant/taggable.rb:39:in `render_tag'
  radiant (1.1.1) app/models/page_context.rb:10:in `initialize'
  radius (0.7.3) lib/radius/context.rb:62:in `call'
  radius (0.7.3) lib/radius/context.rb:62:in `render_tag'
  radius (0.7.3) lib/radius/context.rb:101:in `stack'
  radius (0.7.3) lib/radius/context.rb:61:in `render_tag'
  radiant (1.1.1) app/models/page_context.rb:25:in `render_tag'
  radius (0.7.3) lib/radius/parser.rb:53:in `stack_up'
  radius (0.7.3) lib/radius/parse_tag.rb:12:in `call'
  radius (0.7.3) lib/radius/parse_tag.rb:12:in `to_s'
  radius (0.7.3) lib/radius/utility.rb:32:in `array_to_s'
  radius (0.7.3) lib/radius/parser.rb:31:in `parse'
  radius (0.7.3) lib/radius/parse_tag.rb:12:in `call'
  radius (0.7.3) lib/radius/parse_tag.rb:12:in `to_s'
  radius (0.7.3) lib/radius/parser.rb:34:in `parse'
  radiant (1.1.1) app/models/page.rb:367:in `parse'
  radiant (1.1.1) app/models/page.rb:372:in `parse_object'
  radiant (1.1.1) app/models/page.rb:159:in `render'
  radiant (1.1.1) app/models/page.rb:128:in `process'
  radiant (1.1.1) app/controllers/site_controller.rb:86:in `process_page'
  radiant (1.1.1) app/controllers/site_controller.rb:23:in `show_page'
  
/home/user/.rbenv/versions/1.8.7-p370/lib/ruby/gems/1.8/gems/compass-rails-1.0.3/lib/compass-rails/railties/2_3.rb:9:in
 `process'
  sass (3.2.5) lib/sass/./sass/plugin/rack.rb:54:in `call'
  
/home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/httpserver.rb:104:in 
`service'
  
/home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/httpserver.rb:65:in 
`run'
  /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:173:in 
`start_thread'
  /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:162:in 
`start'
  /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:162:in 
`start_thread'
  /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:95:in 
`start'
  /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:92:in 
`each'
  /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:92:in 
`start'
  /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:23:in 
`start'
  /home/user/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/webrick/server.rb:82:in 
`start'