Previously, there was a bug in LOAD -- it takes an argument called 'vars', 
which it passes to the component as request.vars. However, the 'vars' 
argument was getting ignored, and instead, the request.vars of the parent 
page was getting passed to the component. That has been fixed, but now you 
have to be explicit about passing request.vars from the parent page if you 
want that behavior. So, this should work:
 
LOAD('default','test',vars=request.vars,ajax=False)
 
 
The same goes for request.args -- if you want the args for the component to 
be the same as those for the parent page, you have to add args=request.args 
to the LOAD call.
 
I suppose we could change it so that the 'vars' argument defaults to the 
request.vars of the parent page whenever 'vars' isn't specified, but I'm not 
sure that is desirable default behavior.
 
Anthony

On Monday, July 4, 2011 5:00:59 PM UTC-4, LightOfMooN wrote:

> I made little app to test it: 
> http://ifolder.ru/24534498 
> there should be "test" string, if to click on "test" button 
>
> On 4 июл, 22:19, LightOfMooN <vlads...@yandex.ru> wrote: 
> > No more copy error, but also no vars of current request passing to 
> > LOAD(ajax=False) =\ 
> > 
> > On 4 июл, 20:14, Massimo Di Pierro <massimo....@gmail.com> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > I just made some changes in trunk. Can you give it a try? 
> > 
> > > On Jul 4, 3:45 am, LightOfMooN <vlads...@yandex.ru> wrote: 
> > 
> > > > +1 to that. 
> > > > I have 1.97.1 and it has the problem with request.vars in 
> > > > LOAD(ajax=False) 
> > > > Then I install d4c2d8d15bb1 rev. from trunk. 
> > > > checking request.vars in LOAD(ajax=False) doesn't rises an error 
> > > > anymore, but there was no vars in all LOAD(ajax=False) functions. So, 
>
> > > > I think, current request doesn't be passed to LOAD(ajax=False) 
> > > > functions. Then I try to install 143bbe9e11c1 rev, and it rises 
> error: 
> > 
> > > > Traceback (most recent call last): 
> > > >   File "/opt/web2py/gluon/restricted.py", line 192, in restricted 
> > > >     exec ccode in environment 
> > > >   File "/opt/web2py/applications/nicent/views/default/index.html", 
> > > > line 38, in <module> 
> > > >   File "/opt/web2py/gluon/compileapp.py", line 116, in __call__ 
> > > >     other_request = copy.copy(request) 
> > > >   File "/usr/lib/python2.6/copy.py", line 87, in copy 
> > > >     rv = reductor(2) 
> > > > TypeError: 'NoneType' object is not callable 
> > 
> > > > So I returned to d4c2d8d15bb1. 
> > 
> > > > On 4 июл, 04:56, pbreit <pbreit...@gmail.com> wrote: 
> > 
> > > > > For me, the problem seems to be this changeset:
> http://code.google.com/p/web2py/source/detail?r=143bbe9e11c1c66f6d932... 
> > 
> > > > > Light, if you are cloning Web2py with Mercurial (which is a good 
> idea), you 
> > > > > can specify exactly which version you want to be running like this: 
> $ hg 
> > > > > update [changeset] 
> > 
> > > > > So to set Web2py back to a version that works: $ hg update 
> d4c2d8d15bb1

Reply via email to