Re: [Radiant] Sphinx Extension help

2009-10-31 Thread John Polling
Hi Josh,

Thanks for the info.  In regards to the stack trace this is what I'm  
getting

undefined method `request' for #Advert:0x1064e3340

/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/vendor/rails/activerecord/ 
lib/active_record/attribute_methods.rb:260:in `method_missing'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
38:in `set_process_variables'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
17:in `render_tag'
/Library/Ruby/Gems/1.8/gems/thinking-sphinx-1.2.12/lib/thinking_sphinx/ 
search.rb:102:in `collect'
/Library/Ruby/Gems/1.8/gems/thinking-sphinx-1.2.12/lib/thinking_sphinx/ 
search.rb:102:in `send'
/Library/Ruby/Gems/1.8/gems/thinking-sphinx-1.2.12/lib/thinking_sphinx/ 
search.rb:102:in `method_missing'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/lib/radiant/taggable.rb: 
33:in `send'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/lib/radiant/taggable.rb: 
33:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
10:in `initialize'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
18:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/lib/radiant/taggable.rb: 
33:in `send'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/lib/radiant/taggable.rb: 
33:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
10:in `initialize'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
18:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
18:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/lib/radiant/taggable.rb: 
33:in `send'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/lib/radiant/taggable.rb: 
33:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
10:in `initialize'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
18:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page.rb:287:in  
`parse'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page.rb:292:in  
`parse_object'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page.rb:142:in  
`render_snippet'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/standard_tags.rb: 
374:in `tag:content'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/lib/radiant/taggable.rb: 
33:in `send'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/lib/radiant/taggable.rb: 
33:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
10:in `initialize'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page_context.rb: 
18:in `render_tag'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page.rb:287:in  
`parse'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page.rb:292:in  
`parse_object'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page.rb:126:in  
`render'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/models/page.rb:116:in  
`process_without_mailer'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/controllers/ 
site_controller.rb:46:in `process_page'
/Library/Ruby/Gems/1.8/gems/radiant-0.8.0/app/controllers/ 
site_controller.rb:20:in `show_page'

Thanks

John
On 30 Oct 2009, at 13:59, Josh French wrote:

 This works fine as all the news gets indexed, however I'm struggling
 to search the news article.  When I do a search terms that has
 NewsArticles in it I get the following error message

 Hi John,

 The Sphinx Search extension was initially built to work with arbitrary
 models but the actual results page is a late addition and so may need
 some tweaking. Can you paste a little more of the stack trace where
 you're getting the undefined method `request' error? I suspect it's
 just that the results tags are expecting Page objects and your
 NewsArticle pages don't conform to some assumption. (I am assuming
 that NewsArticle is *not* a Page subclass -- is that correct?)

 does it mean that the tags are being
 indexed and as such and class or id attributes etc might appear

 I *think* the strip_html option operates before your content gets
 indexed, but you might want to verify that with the Sphinx folks.

 One final question, there doesn't appear to be a link tag in the
 extension's tag class.  Do I need to write my own 'link' tag to link
 to the correct page?

 In your case, you'll need to because you have polymorphic results
 objects. There's no way of knowing if your models have methods like
 link, url, or slug, so I can't supply tags that automatically expose
 the proper links.

 In the simple case however -- a search that returns Page objects only
 -- within an r:results:each block you should be able to call any tag  
 that a Page responds to, like r:url or r:title.

 Josh
 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   

[Radiant] Gallery extension

2009-10-31 Thread Clubiste Ben Stadiste
Hi,
I am trying to test and use the gallery extension. While trying to  
upload files (single file or batch import) I got the following error:

Processing GalleryImportingsController#import (for 127.0.0.1 at  
2009-10-31 11:36:08) [PUT]
   Parameters: {action=import,  
authenticity_token=+ailQmOb8T5z9Qntn1/sjJN4QSwPngaREIoimASZMoY=,  
_method=put, id=1, controller=gallery_importings,  
gallery_id=1}

ActiveRecord::UnknownAttributeError (unknown attribute: uploaded_data):
   vendor/extensions/gallery/app/controllers/ 
gallery_importings_controller.rb:66:in `new'
   vendor/extensions/gallery/app/controllers/ 
gallery_importings_controller.rb:66:in `create_item'
   vendor/extensions/gallery/app/controllers/ 
gallery_importings_controller.rb:34:in `import'
   radiant (0.8.1) vendor/plugins/haml/rails/./lib/sass/plugin/ 
rails.rb:19:in `process'

Rendering rescues/layout (internal_server_error)

Does any know what's the issue?

Thanks,


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Sphinx Extension help

2009-10-31 Thread John Polling
Actually I've managed to resolve this issue.  The extension uses the  
following code in the radius tag

 tag 'results:each' do |tag|
   tag.locals.results.collect do |result|
 tag.locals.page = result
 tag.expand
   end.join(\n)
 end

the variable tag.locals.page conflicts with the page object, so  
changing to tag.locals.foundpage solves the problem.

I also had to change the 'results:each:excerpt' to get the excerpt  
like this

tag.locals.results.excerpt_for(content, tag.locals.foundpage.class)

as excerpt_for needs to know what class it is working on.

Now all I need to do is write a custom link and title tag for the  
radius tags and I'm sorted.

John

On 30 Oct 2009, at 13:59, Josh French wrote:

 This works fine as all the news gets indexed, however I'm struggling
 to search the news article.  When I do a search terms that has
 NewsArticles in it I get the following error message

 Hi John,

 The Sphinx Search extension was initially built to work with arbitrary
 models but the actual results page is a late addition and so may need
 some tweaking. Can you paste a little more of the stack trace where
 you're getting the undefined method `request' error? I suspect it's
 just that the results tags are expecting Page objects and your
 NewsArticle pages don't conform to some assumption. (I am assuming
 that NewsArticle is *not* a Page subclass -- is that correct?)

 does it mean that the tags are being
 indexed and as such and class or id attributes etc might appear

 I *think* the strip_html option operates before your content gets
 indexed, but you might want to verify that with the Sphinx folks.

 One final question, there doesn't appear to be a link tag in the
 extension's tag class.  Do I need to write my own 'link' tag to link
 to the correct page?

 In your case, you'll need to because you have polymorphic results
 objects. There's no way of knowing if your models have methods like
 link, url, or slug, so I can't supply tags that automatically expose
 the proper links.

 In the simple case however -- a search that returns Page objects only
 -- within an r:results:each block you should be able to call any tag  
 that a Page responds to, like r:url or r:title.

 Josh
 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Could not connect to postgresql

2009-10-31 Thread Артём Большаков
Hello.
I'm trying to run radiant on postgresql, but an error following appears;

/usr/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:968:in
 
`initialize': FATAL:  Ident authentication failed for user radiant 
(PGError)

In postgre log:
2009-10-31 14:22:01 MSK FATAL:  Ident authentication failed for user radiant
2009-10-31 14:40:20 MSK FATAL:  Ident authentication failed for user radiant 


I'm absolutely sure in my login and password, because another ruby apps uses 
postgre and works perfect.

ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
Radiant 0.8.1
Postgresql 8.3
$ uname -a
Debian Linux 2.6.26-2-686 #1 SMP Sat Oct 17 17:59:23 UTC 2009 i686 GNU/Linux

-- 
Regards
Artyom Bolshakov
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Redcloth Acronym limitation

2009-10-31 Thread Jason Garber
No, you hit upon the best way.  Unfortunately the % signature for  
spans in Textile doesn't take a title option like links and acronyms.   
Textile intends for you to use HTML inline when necessary, so go right  
ahead with your span tags, though you shouldn't need the double-equals  
for escapement.

Should be able to do span title=explanatory textmulti word stuff,  
not upper case/span without problem.

pShould be able to do span title=explanatory textmulti word  
stuff, not upper case/span without problem./p
-Jason

On Oct 29, 2009, at 11:02 PM, Anton Aylward wrote:

 I've been experimenting with embedding the 'title' tag.

 Redcloth does this with the 'acronym mechanism.

 From http://redcloth.org/textile/writing-paragraph-text/
 there is the example

  The EPA(Environmental Protection Agency) is measuring
  GHG(greenhouse gas) emissions.

 being mapped to

 pThe acronym title=Environmental Protection Agency
 span class=capsEPA/span/acronym is measuring
 acronym title=greenhouse gasspan class=capsGHG/span/ 
 acronym
 emissions./p

 The key bit here is that the
   title=Environmental Protection Agency
 causes a popup.

 I want to do a similar thing but end up as

   tag
 title=explanatory text

 multi word stuff, not upper case
   /tag

 The 'tag' will probably be a span

 The best I've figured out is

  ==span title=explanatory text
 multi word stuff, not upper case
   /span==

 which is a bit clunky.

 Any ideas?

 -- 
  Between the iron gates of fate, The seeds of time were sown,
  And watered by the deeds of those Who know and who are known;
  Knowledge is a deadly friend When no one sets the rules.
  The fate of all mankind I see Is in the hands of fools.
  - Greg Lake

 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Could not connect to postgresql

2009-10-31 Thread Jim Gay

On Oct 31, 2009, at 7:41 AM, Артём Большаков wrote:

 Hello.
 I'm trying to run radiant on postgresql, but an error following  
 appears;

 /usr/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/activerecord/ 
 lib/active_record/connection_adapters/postgresql_adapter.rb:968:in
 `initialize': FATAL:  Ident authentication failed for user radiant
 (PGError)

 In postgre log:
 2009-10-31 14:22:01 MSK FATAL:  Ident authentication failed for user  
 radiant
 2009-10-31 14:40:20 MSK FATAL:  Ident authentication failed for user  
 radiant


 I'm absolutely sure in my login and password, because another ruby  
 apps uses
 postgre and works perfect.

Does your other ruby app use the same credentials?


 ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
 Radiant 0.8.1
 Postgresql 8.3
 $ uname -a
 Debian Linux 2.6.26-2-686 #1 SMP Sat Oct 17 17:59:23 UTC 2009 i686  
 GNU/Linux

This might help http://www.depesz.com/index.php/2007/10/04/ident/


Jim Gay
http://www.saturnflyer.com




___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant