XF 2.0 can't logout - I get Oops! We ran into some problems.

PabloC

Member
Hi,

I have moved to Xenforo a few days ago. After setting all up, I am trying to check that everything works ok, but I have found a couple of issues.

I can't logout. The "logout" links to
http://xxxxx.com/logout/?t=1513384829,69eb8f46a1e5a19f2612235b4f8d135a

and once I click, i get redirected to

http://xxxxx.com/threads/1513384829%2C69eb8f46a1e5a19f2612235b4f8d135a

and get this error message
borrarxenf.webp


I have installed Spanish language, and edited Route filters to change, for example, "threads" to "temas". I mention it just in case may help to figure out the cause.

Thanks!
 
Based on the fact that you're being redirected to threads, I expect this is related to some custom rewrite rules that you have in place -- perhaps targeting any "t=" in the query string. This will need to be adjusted to not be triggered here.
 
This is almost certainly something custom and outside of XF that is causing it. I would guess it's related to custom redirection rules in your .htaccess though I can't be positive the form they will take exactly.
 
This is what I have about redirects in my htaccess. At the fourth line there's "t=", what you mention before could be causing some issues. What do you think?


RewriteEngine on

RewriteCond %{QUERY_STRING} ^f=([^&]+)$ [NC]
RewriteRule ^index\.php$ http://xxxxx.com/forums/%1? [NC,L,R]

RewriteCond %{QUERY_STRING} ^t=([^&]+)$ [NC]
RewriteRule ^index\.php$ http://xxxxx.com/threads/%1? [NC,L,R]

RewriteEngine ON
RewriteRule ^/member.php\?u=(.+)\&^ /members/$1 [R=301,L]

RewriteCond %{QUERY_STRING} ^u=([^&]+)$ [NC]
RewriteRule ^index\.php$ http://xxxxx.com/members/%1? [NC,L,R]


<IfModule mod_rewrite.c>
RewriteEngine On

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo

# This line may be needed to enable WebDAV editing with PHP as a CGI.
# RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
I\ve hasd similar iissues caused by .htaccess

The way to test is to remove everything from .hracess, then test. If the issue is gone you know it was something in .htaccess.

So put things back one by one and test each time until you find the cuprit.
 
Yes, those custom rules at the top would specifically cause this. You either need to add extra conditions to make them match more specifically (such as limiting them to a particular script) or adjust the regex to match in a more limited way. (Or remove them and do redirection a different way.)

The regex adjustment is simplest but not necessarily perfect as it may still be triggered in the future. Changing it to look like this is likely more what you want anyway: ^t=([0-9]+)$
 
@Mike, you are a star!

I modified this line
RewriteCond %{QUERY_STRING} ^t=([^&]+)$ [NC]
adding what you wrote
RewriteCond %{QUERY_STRING} ^t=([0-9]+)$ [NC]

and it seems to work perfectly.

Thanks a lot!
 
Back
Top Bottom