Re: [Radiant] Help with Radiant Gallery

2008-07-03 Thread Andrea Franz
On Wed, Jul 2, 2008 at 7:36 PM, Alfredo Perez [EMAIL PROTECTED] wrote:
 Andrea

 This is what the log says, do you see any problems?

 Processing GalleryImportingsController#import (for XXX.XXX.XXX.XXX at 
 2008-06-30 17
 :18:21) [PUT]
  Session ID: 092afe677c170c91bee73aa211da297b
  Parameters: {gallery_id=1, action=import, _method=put, 
 id=1
 , controller=gallery_importings}


 ActionController::InvalidAuthenticityToken 
 (ActionController::InvalidAuthenticit
 yToken):

Yes, the authenticity_token is not sent with the form. I fixed this
bug in the latest version, maybe you aren't using the latest gallery
extension.
Try to pull from github and let me know ;)

-- 
Andrea Franz
http://gravityblast.com - http://nimboo.net
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Settings Extension for easy access to configuration

2008-07-03 Thread Jim Gay

On Jul 2, 2008, at 10:27 PM, Tim Gossett wrote:

On Sun, Jun 22, 2008 at 3:06 AM, Alex Wayne [EMAIL PROTECTED] 


wrote:


I whipped up a quick extension today that some might find useful.  I
searched around a little and didn't come with any solutions that I  
was

happy with, form a functional or aesthetic standpoint



I had a little problem with main branch by Squeegy.  
(SettingsExtension.root
was returning nil). I found saturnflyer's fork, released just a day  
after

Squeegy's latest, and it works just fine.


We don't have plans to try to takeover this extension since Alex is  
doing a great job with it.
Our fork provides the ability to add your own settings because we have  
at least one server where ruby-inline is not installed so we can't do  
script/console and having the ability to add new settings was crucial  
for setting up 'dev.host'


I don't recall any SettingsExtension.root problem, so it may just be a  
fluke that it works in our fork.


For the most part, we only forked to help with improving it and  
writing specs, so keep your eye on the Squeegy repository.


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


Re: [Radiant] radiant + exception_notification plugin

2008-07-03 Thread Michael Hale
Ok it turns out that adding the pastie was only half the fix. I also
needed to update the views_path which I did in an initializer. Here is
what my app/config/initializers/exception_notification.rb looks like:

# Make exception notifier compatible with radiant
require 'exception_notifier_ext'
ExceptionNotifier.send(:include, ExceptionNotifierExt)
ActionMailer::Base.view_paths 
#{RAILS_ROOT}/vendor/plugins/exception_notification/views

class ApplicationController  ActionController::Base
  include ExceptionNotifiable
end
ExceptionNotifier.sender_address = %(Application Error [EMAIL PROTECTED])
ExceptionNotifier.exception_recipients = %w([EMAIL PROTECTED])

On Mon, Jun 30, 2008 at 4:28 PM, Michael Hale [EMAIL PROTECTED] wrote:
 Hi Thanks for the help. I tried installing the pastie as you
 suggested, but it doesn't fix the issue I am having.

 Upon further inspection it seems that all that the code does is
 include ExceptionNotifierHelper in ExceptionNotifier. I guess I don't
 understand how that will add exception_notification/views to the
 views_path.

 On Sat, Jun 28, 2008 at 11:11 AM, Casper Fabricius
 [EMAIL PROTECTED] wrote:
 Hi Michael,

 I've run into the same problem, and solved it by adding a small mixin that
 overrides a method in ExceptionNotifier:

 http://pastie.org/223988

 Put this code in a file in lib and make sure to include it and mix it in in
 environment.rb or in an extension class:

 ::ExceptionNotifier.send :include, ExceptionNotifierExt

 Cheers,
 Casper



 On 27/06/2008, at 22:26, Michael Hale wrote:

 Hi all,

 I'm having trouble using the exception_notification with radiant.

 The problem seems to be that the plugin's views dir is not in
 ActionMailer::Base.view_paths. I was able to hack around the problem
 and send an email by adding a line like this:
  view_paths  'radiant_app/vendor/plugins/exception_notification/views'
 to radiant's Radiant::MailerViewPathsExtension#full_template_path
 (mailer_view_paths_extension.rb:18)

 My question is how do I properly tell ActionMailer::Base (which is
 what Radiant::MailerViewPathsExtension is extending) about the
 exception_notification's views dir? Or is there a better way to have
 exception_notifications in radiant?

 Thanks, Michael

 BTW here is the relevant portion of my stack trace for reference:

 Rendering radiant_app/public/500.html (500 Error)
 /!\ FAILSAFE /!\  Fri Jun 27 16:08:35 -0400 2008
  Status: 500 Internal Server Error
  can't convert nil into String

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/lib/plugins/extension_patches/lib/mailer_view_paths_extension.rb:87:in
 `dirname'

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/lib/plugins/extension_patches/lib/mailer_view_paths_extension.rb:87:in
 `initialize_template_class'

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/actionmailer/lib/action_mailer/base.rb:502:in
 `render'

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/actionmailer/lib/action_mailer/base.rb:494:in
 `render_message'

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/lib/plugins/extension_patches/lib/mailer_view_paths_extension.rb:65:in
 `create!'

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/actionmailer/lib/action_mailer/base.rb:403:in
 `initialize'

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/actionmailer/lib/action_mailer/base.rb:352:in
 `new'

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/actionmailer/lib/action_mailer/base.rb:352:in
 `method_missing'

 radiant_app/vendor/plugins/exception_notification/lib/exception_notifiable.rb:95:in
 `rescue_action_in_public'

 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/app/controllers/application.rb:36:in
 `rescue_action_in_public'
 ___
 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 mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Help with Radiant Gallery

2008-07-03 Thread Alfredo Perez
WOW, it works... finally it works... I was about to give up on rails

Now I have figure out how to create the gallery and put it on the net

Big thanks my friend Andreas

Alfredo

On Thu, Jul 03, 2008 at 06:39:17PM +0200, Andrea Franz wrote:
 On Thu, Jul 3, 2008 at 5:29 PM, Alfredo Perez [EMAIL PROTECTED] wrote:
  I pulled the latest from github and replaced the folder gallery on my 
  server.
 
  Do I have to re-create the the whole project with the new gallery data?
 
 You just need to run the radiant:extensions:gallery:install task.
 It should update the db and the configuration files. Images will not
 be removed, let me know.
 
 
  Alfredo
 
  BTW: I wanted to thank you for your help
 
  On Thu, Jul 03, 2008 at 10:46:32AM +0200, Andrea Franz wrote:
  On Wed, Jul 2, 2008 at 7:36 PM, Alfredo Perez [EMAIL PROTECTED] wrote:
   Andrea
  
   This is what the log says, do you see any problems?
  
   Processing GalleryImportingsController#import (for XXX.XXX.XXX.XXX at 
   2008-06-30 17
   :18:21) [PUT]
Session ID: 092afe677c170c91bee73aa211da297b
Parameters: {gallery_id=1, action=import, _method=put, 
   id=1
   , controller=gallery_importings}
  
  
   ActionController::InvalidAuthenticityToken 
   (ActionController::InvalidAuthenticit
   yToken):
 
  Yes, the authenticity_token is not sent with the form. I fixed this
  bug in the latest version, maybe you aren't using the latest gallery
  extension.
  Try to pull from github and let me know ;)
 
  --
  Andrea Franz
  http://gravityblast.com - http://nimboo.net
  ___
  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
 
 
 
 
 -- 
 Andrea Franz
 http://gravityblast.com - http://nimboo.net
 ___
 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