I propose a temporary solution to the problem.
Edit vendor/extensions/paperclipped/app/views/admin/assets/
_show_bucket_link.html.haml .
Comment out the first line "- unless @page.new_record?" and fix
indentation of the rest lines.

/* - unless @page.new_record? */
%span#show-bucket
  = t('paperclipped.bucket')
  = link_to t("paperclipped.show_assets_bucket"), "#"

This will prevent radiant from crash when add page parts.

On Jul 7, 3:24 pm, Stanislav Savulchik <larry....@gmail.com> wrote:
> I have the same problem.
>
> On Jul 6, 5:50 pm, ingvi <ingvi.t...@gmail.com> wrote:
>
> > could it be a bug in the paperclipped extension? hmmm
>
> > ingvi
>
> > On Jul 5, 9:53 am, ingvi <ingvi.t...@gmail.com> wrote:
>
> > > I was trying to add a part to a page, I get this error:
>
> > > Processing Admin::PagePartsController#create (for 194.144.245.194 at
> > > 2010-07-05 09:40:27) [POST]
> > >   Parameters: {"commit"=>"Add Part", "action"=>"create",
> > > "authenticity_token"=>"DsjX3J3/60FbEwYbST5yDbziHDdE99BLANsLvD1PTsA=",
> > > "controller"=>"admin/page_parts", "page_part"=>{"name"=>"pop"},
> > > "index"=>"1"}
>
> > > ActionView::TemplateError (undefined method `new_record?' for
> > > nil:NilClass) on line #1 of vendor/extensions/paperclipped/app/views/
> > > admin/assets/_show_bucket_link.html.haml:
> > > 1: - unless @page.new_record?
> > > 2:   %span#show-bucket
> > > 3:     = t('paperclipped.bucket')
> > > 4:     = link_to t("paperclipped.show_assets_bucket"), "#"
>
> > >     vendor/extensions/paperclipped/app/views/admin/assets/
> > > _show_bucket_link.html.haml:1:in
> > > `_run_haml_vendor47extensions47paperclipped47app47views47admin47assets47_show_bucket_link46html46haml_locals_object_page_part_show_bucket_link'
> > >     radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/
> > > action_view_mods.rb:11:in `render'
> > >     radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers.rb:
> > > 90:in `non_haml'
> > >     radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/
> > > action_view_mods.rb:11:in `render'
> > >     radiant (0.9.1) app/helpers/admin/regions_helper.rb:11:in
> > > `render_region'
> > >     radiant (0.9.1) app/helpers/admin/regions_helper.rb:9:in `map'
> > >     radiant (0.9.1) app/helpers/admin/regions_helper.rb:9:in
> > > `render_region'
> > >     radiant (0.9.1) app/views/admin/page_parts/_page_part.html.haml:
> > > 16:in
> > > `_run_haml_47home47ingvi4746gem47ruby47146847gems47radiant45046946147app47views47admin47page_parts47_page_part46html46haml_locals_object_page_part_page_part_counter'
> > >     radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/
> > > action_view_mods.rb:13:in `render'
> > >     radiant (0.9.1) app/controllers/admin/page_parts_controller.rb:
> > > 7:in `create'
> > >     radiant (0.9.1) vendor/plugins/haml/rails/./lib/sass/plugin/
> > > rails.rb:20:in `process'
>
> > > Rendering /u/apps/studioakkeri.com/public/500.html (500 Internal
> > > Server Error)
>
> > > You guys have clue what I can do to fix this?
>
> > > ingvi
>
>

Reply via email to