Fixed  Login and logout errors

Deebs

Well-known member
Guys,

On my test forum I am having problems logging in and logging out. It seems to be fairly consistent under IE8.

Whenever I perform either action I get the following error:

The controller does not define an action called.

The resultant action is ok, I am either logged in or logged out but the error is displayed.

I'll try and reproduce under FF.
 
Have stripped back my config file to just the following:

Code:
server {
        listen xx.xx.xx.61:80;
        server_name testforums.somedomain.com;

        root   /data/websites/testforums.somedomain.com;
        index index.php;

        location / {
               try_files               $uri $uri/ /index.php?$uri&$args;
        }
        location ~ ^(.+\.php)(.*)$ {

                include /usr/local/nginx/conf/fastcgi_params;
                fastcgi_index index.php;
                if (-f $request_filename) {
                    fastcgi_pass phpfpm_backend;

                }
        }
}

The problem still exists, looking in the logs I see the following:

"GET /logout/?_xfToken=6%2C1299759087%2C35f4cdc8fa62ebd8274b48ab577b8b85ced092cf HTTP/1.1" 303 5 "http://testforums.somedomain.com/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2)"
"GET /. HTTP/1.1" 301 178 "http://testforums.somedomain.com/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2)"
"GET /./ HTTP/1.1" 404 4146 "http://testforums.somedomain.com/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2)"

As you can see, the penultimate entry is giving a redirect which is then giving a 404 error and this then causes the error to be displayed.

Doing the exact same thing in FF 3.6.15 gives the following log entries:

"GET /logout/?_xfToken=6%2C1299759617%2Cec081fc060a41bde0ddff11fbca67befe299bcbd HTTP/1.1" 303 5 "http://testforums.somedomain.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
"GET / HTTP/1.1" 200 14459 "http://testforums.somedomain.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
"GET /js/jquery/jquery.xenforo.rollup.js?_v=3cd86e19 HTTP/1.1" 304 0 "http://testforums.somedomain.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
"GET /js/xenforo/xenforo.js?_v=3cd86e19 HTTP/1.1" 304 0 "http://testforums.somedomain.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"

Firefox is requesting different urls from IE8 to logout. Now if it was a configuration issue with nginx then surely I would see the same urls being asked for regardless, as that is a client side request.
 
Have tried that and it didn't work. My point still stands, from the server side logs IE8 is requesting a different URL from FF when logging out.
 
I saw the same thing for a while when I was trying to setup my forum as a sub domain, but I thought it was an nginx configuration problem too, I saw exactly the same thing, that FF and IE8 were sending different redirects.
 
This should fix it.

In library/XenForo/Link.php, add the lines in red:
Rich (BB code):
        if ($uri == '.')
        {
            $uri = ''; // current directory
        }

        if (substr($uri, 0, 1) == '/')
 
This should fix it.

In library/XenForo/Link.php, add the lines in red:
Rich (BB code):
        if ($uri == '.')
        {
            $uri = ''; // current directory
        }

        if (substr($uri, 0, 1) == '/')

Mike,

Applied the fix and can confirm it now works as expected in IE 8. Many thanks.
 
Top Bottom