Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Mambo Bridge Support => Topic started by: masters1333 on May 24, 2006, 12:19:27 PM

Title: Login/Logout Redirecting to Forum
Post by: masters1333 on May 24, 2006, 12:19:27 PM
Hello,

Thanks for your great work on the bridge. I have a strange problem with the login/logout redirect. My settings in the module backend for redirection are (Back to the page from which the user logged in and Back to the page from which the user logged out) and these are not being respected when I use Firefox at all. It redirects back to the SMF Main Page. When I use IE and Opera it does the same thing but only when I am on the com_smf_registration page, otherwise it redirets back to the page from which the user logged in/out. I don't know why this is happening because I didn't have this problem when I originally installed the bridge. I'll try and tell you everything I can think of to minimize questions.

I recently enabled cache in the joomla backend and the gzip function.

Bridge version: 1.1.4
SMF version: 1.1 RC2
Joomla! Version:    Joomla! 1.0.8 Stable [ Sunshade ] 26-Feb-2006 05:00 UTC
Database Version:       4.0.27-max-log
PHP Version:    4.3.11
Web Server:    Apache
WebServer to PHP interface:    cgi-fcgi

SMF Forum is set to Wrapped with correct path to smf directory

SMF Feature Configuration:
Database driven sessions: checked
Enable local stroage of cookies: unchecked
Use subdomain independent cookies: checked

Joomla extra extensions:
com_joomap
pollXT
mod_exmenu
mod_countdown
mod_d4j_content_listing
mod_smf_recent_topics

Thanks
Chris
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 24, 2006, 05:45:49 PM
Thank you for the detailed post.  It really helps out a lot.  :)

If it works in IE and not in FireFox, then it has something to do with JavaScript or sessions.  Since the redirect URL is stored in the session, I'd say that is probably the origin.

Can I see a URL?
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 24, 2006, 06:27:47 PM
sure... link removed
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 24, 2006, 07:19:05 PM
Interesting.  In your login form:

<input type="hidden" name="return" value="http://www.sofacoach.com/" />

Never changes. 
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 24, 2006, 09:27:55 PM
What is the correct behavior? Just out of curiosity I checked your website and it has the same...
<input type="hidden" name="return" value="http://www.everything-science.com/" />
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 24, 2006, 09:40:49 PM
You're right....Thanks.  :)

It's supposed to be this:  $_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING']

I'll see what I can do...
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 24, 2006, 09:55:27 PM
I replaced the line:

<input type="hidden" name="return" value="', sefReltoAbs(basename($_SERVER['PHP_SELF']), '?', $_SERVER['QUERY_STRING']), '" />

from mod_smf_login.php from the 1.1.4 bridge with the line:

<input type="hidden" name="return" value="', $mosConfig_sef=='1' ? sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING']) : $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING'], '" />

from the 1.1.3 bridge.

This didn't seem to fix the problem. The value changes now like it should  ???.
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 24, 2006, 10:08:03 PM
Did you perhaps upgrade from an earlier bridge?  The line you quoted is from a 3.19a bridge, not 1.1.4.  The line should be identical from 1.1.3 to 1.1.4.
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 24, 2006, 10:26:13 PM
I never used 1.1.3. 1.1.4 was released before I got a chance to install it but I have a folder labeled 1.1.3 on my computer where I got the old file. Maybe I labeled it incorrectly... my bad. This didn't work anyway. Before I installed 1.1.4 I uninstalled all of the bridge related pieces from my joomla backend. So yes I upgraded from the bridge prior to 1.1.3.

Chris
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 24, 2006, 10:37:29 PM
Do you mind trying something?

Unzip bridge 1.1.4, and upload the mod_smf_login.php and mod_smf_login.x to your modules folder.  Then rename mod_smf_login.x to mod_smf_login.xml.
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 24, 2006, 10:57:21 PM
I did that and it did nothing and then I uninstalled the smf_login module and then did what you said and I can't see it in the backend anymore. I guess just reinstall the bridge?
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 24, 2006, 11:05:16 PM
Yeah.  Unfortunately, the one-step install also disables the ability to install each piece separately.
Title: Re: Login/Logout Redirecting to Forum
Post by: Kindred on May 26, 2006, 08:51:45 PM
Hmmm... Orstio,

I can recreate this on a site I am trying to help install...   it keeps bumping to the unwrapped forum on login and on a successful post... or a successful save in the admin area.
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 26, 2006, 08:55:52 PM
Turn off SEF in SMF.
Title: Re: Login/Logout Redirecting to Forum
Post by: Kindred on May 26, 2006, 08:56:55 PM
SEO is OFF in SMF... (first thing I checked)


-edit- solved for my issue...   wa sbeing caused by an incomplete UNinstallation of the joomlahacks bridge...   Same effect, but a different issue than the main topic of this thread..
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 26, 2006, 09:07:28 PM
Can I see a URL?
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 26, 2006, 10:42:24 PM
I completely uninstalled the site today and installed everything on a new database. I can do this because I don't have any users yet. Anyways I got it to work like it should but now when i turn SEF on it creates the problem. It works perfectly with it off.
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 26, 2006, 10:45:27 PM
Can you post the contents of your .htaccess?
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 26, 2006, 10:50:40 PM

##
# @version $Id: htaccess.txt 2368 2006-02-14 17:40:02Z stingrey $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
# Only use one of the two SEF sections that follow.  Lines that can be uncommented
# (and thus used) have only one #.  Lines with two #'s should not be uncommented
# In the section that you don't use, all lines should start with #
#
# For Standard SEF, use the standard SEF section.  You can comment out
# all of the RewriteCond lines and reduce your server's load if you
# don't have directories in your root named 'component' or 'content'
#
# If you are using a 3rd Party SEF or the Core SEF solution
# uncomment all of the lines in the '3rd Party or Core SEF' section
#
#####################################################

#####  SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
# SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
# OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
#
# In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# May need to be uncommented.  If you are running your Joomla/Mambo from
# a subdirectory the name of the subdirectory will need to be inserted into this
# line.  For example, if your Joomla/Mambo is in a subdirectory called '/test/',
# change this:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# to this:
# RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
#
#####################################################


##  Can be commented out if causes errors, see notes above.
#Options FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On


#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla/MamboDirectory (just / for root)

# RewriteBase /


########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section


########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 26, 2006, 11:00:35 PM
Comment out this line:

RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 26, 2006, 11:08:15 PM
That didn't seem to affect it one way or the other. No change.
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 26, 2006, 11:16:25 PM
Can you go to PhpMyAdmin, to your SMF database, and perform this query:

INSERT INTO smf_settings
   (variable, value)
VALUES ('disableQuotedPrintable', '1');
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 26, 2006, 11:27:46 PM
OK I did that and I tested again and it didn't do anything. Are you seeing the problem on your computer as well?

EDIT... I don't really know what I'm doing in PHP My Admin so how do I know if the query was actually executed? I don't see anything in the SMF Settings table that has anything to do with that query.
Title: Re: Login/Logout Redirecting to Forum
Post by: Orstio on May 26, 2006, 11:37:30 PM
Strange.  This is from your page source:

var smf_scripturl = "http://www.sofacoach.com/component/option,com_smf/Itemid,26//";

Usually, the double-slash at the end of the URL is caused by an incompatibility with UTF-8, which is solved by performing the query above.  The UTF-8 incompatibility also causes things like mis-redirects, and bad emails.
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 26, 2006, 11:42:45 PM
Do you think maybe I didn't perform the query properly? Do I have to select the field on the right "variable"? I could have done the query wrong since it is the first time I've ever used PHPMyAdmin.

EDIT: Well I guess it did perform the query
Error

SQL query:

INSERT INTO smf_settings(
variable,
value
)
VALUES (
'disableQuotedPrintable', '1'
);

MySQL said: Documentation
#1062 - Duplicate entry 'disableQuotedPrintable' for key 1
Title: Re: Login/Logout Redirecting to Forum
Post by: masters1333 on May 30, 2006, 12:00:48 AM
Hey Orstio,

Should this be considered a bug or is this just a problem for me?