Hi,

I've observed an unexpected behavior when I link to the index site of the 
default controller using a site parameter: index.html*/SOMEPARAMETER*
Then, the index.html is rendered first showing the correct "SOMEPARAMETER" 
but starts to redirect to itself infinitely (You will see that the session 
counter increases) and - very strange - the name of the ajax callback 
function "newscb" becomes the site parameter of the index.html site.

I'm not sure if this is a bug or I misunderstood the ajax - function. You 
can simply reproduce the issue setting up a new application in web2py 
2.9.12 (the issue also occurred in the previous version) using the 
following controller functions and the index.html view. 

Thanks a lot for your time!
Best,
Christian

------

[default.py]
def newscb():
    return DIV('TESTNEWS')

def index():
    session.counter = (session.counter or 0) + 1
    param = request.args(0)
    return dict(param = param)

[index.html]
{{extend 'layout.html'}}
<h1>  Hello World! </h1>
<h2>  Site parameter: {{=param}} </h2>
<h2>  Counter: {{=session.counter}} </h2>
<div id='text'> News Section </div>

<script>
    var handler = function() {
        ajax('newscb', [], 'text');
    }
    $(document).ready(handler);
</script>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to