I have a strange problem with an application I have copied from an old 
web2py 2.0.9 installation to another machine running web2py 2.9.5

When I try and register a new user using the standard user function, the 
register button POSTS to the application root /CMS/#, instead of the 
/CMS/default/user/register which is the URL the form is loaded from.

I have the default user method defined in the default.py controller:

def user():
    """
    exposes:
    http://..../[app]/default/user/login
    http://..../[app]/default/user/logout
    http://..../[app]/default/user/register
    http://..../[app]/default/user/profile
    http://..../[app]/default/user/retrieve_password
    http://..../[app]/default/user/change_password
    use @auth.requires_login()
        @auth.requires_membership('group name')
        @auth.requires_permission('read','table name',record_id)
    to decorate functions that need access control
    """
    return dict(form=auth())

I have renamed my user.html to xuser.html to force web2py to use the 
generic.html view. I have switched off javascript in Firefox to rule out 
anything odd going on in some javascript somewhere. I have checked the form 
HTML, there is no separate URL defined anywhere in the form HTML to send 
the POST request anywhere other than the same URL that the form is loaded 
from. I have copied the web2py_ajax.html, web2py.js and jquery.js from the 
new web2py install into my application folder in case out of date code in 
these is causing any problems. A new test application in the web2py 2.9.5 
installation works fine for user registration.

Yet every time I click on the register button the form is submitted to 
/CMS/#, this I have checked using Firefox developer tools (Network tab). I 
can see the parameters I enter to the form are being submitted (using the 
view POST Params feature in Firefox developer tools). 

I am completely out of ideas, and cannot think of any reason the POST does 
not get sent to the originating URL. Does anyone have any suggestions?

If it is of any relevance Web2py is running on ubuntu with an nginx web 
server, the same for both 2.0.9 and 2.9.5 installations.

-- 
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