[Nitro] Official Repo

Massimo Maria Ghisalberti nissl at tiscali.it
Thu Apr 20 15:56:57 EDT 2006


ok Bryan,
yes is an AJAX request autogenerated from  this:

<a
    id="#{Settings[:INTERNALS][:menu_prefix]}item_001"
    client="getSection"
    params="this.id">
    #{_t :item_001}
</a>

the method of Client class:

def getSection

    if Settings[:APPLICATION][:access_log]
        params = "get_client_info(params, true)"
    else
        params = "get_client_info(params, false)"
    end

    ajax_update "content_area",
    {
        :url => "/get_content",
        :method => "get",
        :params => params,

        :before => proc {
            show :spinner
        },
        :success => proc {
            hide :spinner
            show :content_area
            js "propagate_content_info()" # tools.js
        }
    }
    
end

the controller handler method:

def get_content(item)
....
end


this is the console backtrace:

D, [2006-04-20T21:35:12.520048 #17075] DEBUG -- : Rendering
'/get_content'.
D, [2006-04-20T21:35:12.521310 #17075] DEBUG -- : Compiling action
'MainPageController#get_content'
E, [2006-04-20T21:35:12.527002 #17075] ERROR -- : Error while handling
'/get_content'.
E, [2006-04-20T21:35:12.527453 #17075] ERROR -- : wrong number of
arguments (3 for 1)
  (eval):20:in `get_content'
  (eval):20:in `get_content_action'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro/controller.rb:93:in `method_missing'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro/render.rb:129:in `render'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro/adapter/webrick.rb:223:in `do_GET'
  /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service'
  /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
  /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
  /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro/adapter/webrick.rb:59:in `start'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro/server/runner.rb:343:in `invoke_server'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro/server/runner.rb:305:in `invoke'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro/server.rb:128:in `run'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro.rb:78:in `run'
  /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/run.rb:138
  LOGGED
FROM: /home/nissl/develop/eclipse-workspace/projects/www.ilcanticodellanatura.it/application/cantico-0.5.2.0/libs/nitro/nitro/lib/nitro/render.rb:249:in `log_error'
D, [2006-04-20T21:35:12.527814 #17075] DEBUG -- : Rendering '/error'.
D, [2006-04-20T21:35:12.535228 #17075] DEBUG -- : Rendering '/error'.

ciao...

Il giorno gio, 20/04/2006 alle 10.33 -0700, Bryan Soto ha scritto:
> Hi,
> 
> I noticed this is an AJAX request. Are you, by chance, using Nitro's
> script generator? If so, George made same changes to it in the patch
> here:
> 
> http://rubyforge.org/pipermail/nitro-general/2006-April/004038.html
> 
> If not, could you list the backtrace generated on the console running
> webrick? I'm happy to help debug this, but need a little more
> information. :)
> 
> Bryan
> 

-- 
Massimo Maria Ghisalberti <nissl at tiscali.it>




More information about the Nitro-general mailing list