On Jan 17, 2011, at 10:07 AM, Martín Mulone wrote:
> yes is trunk

OK, either try the workaround (url=) or if you want to wait, we'll get LOAD 
fixed in the trunk (might take a day or two).

> 
> 2011/1/17 Jonathan Lundell <jlund...@pobox.com>
> On Jan 17, 2011, at 9:38 AM, Martín Mulone wrote:
> > return LOAD('plugin_comments','comments.load',args=[tablename, record_id, 
> > page],ajax=True)
> >   File 
> > "/home/martin/Repositorios/google_appengine/web2py/gluon/compileapp.py", 
> > line 145, in __call__
> >     extension=extension)
> >   File "/home/martin/Repositorios/google_appengine/web2py/gluon/html.py", 
> > line 262, in URL
> >     acf = rewrite.map_url_out(application, controller, function, args, r or 
> > _request)
> >   File 
> > "/home/martin/Repositorios/google_appengine/web2py/gluon/rewrite.py", line 
> > 867, in map_url_out
> >     map = MapUrlOut(application, controller, function, args, request)
> >   File 
> > "/home/martin/Repositorios/google_appengine/web2py/gluon/rewrite.py", line 
> > 722, in __init__
> >     self.domain_application = self.request.env.domain_application
> > AttributeError: 'NoneType' object has no attribute 'env'
> >
> > I start to test, but I have this error In GAE
> >
> 
> Thanks, Martín. Is this the current trunk?
> 
> What's happening is that LOAD is calling URL in a peculiar way (Massimo, 
> would you take a look, please?). It's making this call:
> 
> html.URL(request.application,c,f, args=args,vars=vars,extension=extension)
> 
> ...which means that URL isn't able to pass request on to the URL rewriter.
> 
> As a temporary workaround, you can do the URL rewriting yourself by adding a 
> url= argument to your LOAD call:
> 
>        ..., url=URL(r=request, c='plugin_comments', f='comments.load', 
> args=[tablename, record_id, page])
> 
> in which case you don't have to pass those args to LOAD (but I think it does 
> no harm).
> 
> 
> Massimo, I think that LOAD's call to html.URL needs to include request, or 
> else simply call URL, which will take care of it automatically. Do you see 
> any reason not to do that? (This will be a non-problem once we have 
> request-scope globals available in gluon.)
> 
> 
> 
> -- 
> Pablo Martín Mulone (mar...@tecnodoc.com.ar)
> http://www.tecnodoc.com.ar/
> Paraná, Entre Ríos, Argentina (CP 3100).
> 
> My blog: http://martin.tecnodoc.com.ar
> Expert4Solution Profile: http://www.experts4solutions.com/e4s/default/expert/6
> 
> 


Reply via email to