Joomla 1.08 login redirect url problem

Started by silentz, March 29, 2006, 09:23:01 AM

Previous topic - Next topic

silentz

Hi there,

I've applied the fix at thislink:
http://www.simplemachines.org/community/index.php?topic=25718.msg504382#msg504382

for the Joomla 1.08 login problem and barring one small glitch its working great (thx all). The one small problem is that it seem to log in to both Joomla and SMF (I can access user only parts of both), but when I first log in it takes me to a page with:

"An Error Has Occurred!
You were unable to login. Please check your cookie settings."

Now I repeat, I AM logged in, to the point where on that same page I can click "Admin" and go to all the admin pages and it shows my Avatar in Joomla, but I'm just getting this message instead of it redirecting to the page the user was on or to SMF.

I've checked my cookies, changed the cookie setting, subdomain independant cookies are on, local cookie storage is off. I'm on J! 1.08 + SMF 1.1 RC2 + Bridge 3.20 + J! 1.08 login bridge fix

Any ideas?
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

Orstio

What is the code you put in your Joomla template header?  Can you copy it and paste it here?

silentz

Here you go...


if (!defined('SMF')){
require ("administrator/components/com_smf/config.smf.php");
require ($smf_path."/SSI.php");
}

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

mysql_select_db($mosConfig_db);

echo '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?beta4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_session_id = "', $context['session_id'], '";
// ]]></script>';

echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc1" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?beta4" media="print" />
<link rel="help" href="', $scripturl, '?action=help" target="_blank" />
<link rel="search" href="' . $scripturl . '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
?>

<script type="text/javascript"><!--//--><![CDATA[//><!--
sfHover = function() {
var sfEls = document.getElementById("mainlevelmainnav")
.getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--><!]]></script>
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

Orstio

Good.  How about if you change this line:

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?beta4"></script>


to this:

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc2"></script>

silentz

No joy so far. It's doing exactly the same thing.

I'm wondering though... that code change you posted. I'm assuming that was to get the site loading the .js fresh instead of a cached version. Was there another version of script.js for J! 1.08? If so I haven't seen / uploaded it, so I'm not sure what reloading the one that's there would do...

Have I missed something obvious?
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

Orstio

Script.js is a part of SMF, not Joomla.


What if you also add this directly below that line:

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

silentz

No joy yet, so I held off for the release of 1.13 but I'm still getting the same error.

So now I'm on:

J! 1.08
SMF 1.1 RC2
Bridge 1.13

And I've taken out the smf code in my template as per the install instructions.

Yet still SMF taunts me with it's "Unable to login. Please check your cookie settings"
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

Orstio

QuoteUnable to login. Please check your cookie settings

In your SMF admin panel, what are the settings for the following?

Enable local storage of cookies:

Use subdomain independent cookies:

silentz

Local storage: off
subdomain independant: on
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

Orstio


silentz

No change so far.

BTW I'll PM you a URL and username / password if that would help.
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"


Orstio

#12
Are you absolutely sure that this is 1.1.3?  You did completely uninstall 1.1.2 first?

EDIT -- Odd, it seems to be working now.....

silentz

I went through and uninstalled the bridge and the registration module. Joomla doesn't seem to be able to physically remove these files though so I manually deleted the files I could see (mod_smf_login and com_smf) and deleted the menu item. I also took out the code in the template as per the install instructions. Then I just installed 1.1.3 and went through the configuration options I could see (which had all the new group synch stuff).

It's possible that I might have missed deleting a file, but I didn't get any php "This file already exists" messages...
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

silentz

So it's working for you Oristo?

I'm still getting the error message on both IE 6 and FF 1.5.

Hmmm......
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

Orstio


silentz

Looks like it's something to do with session verification.

I get the error message only when I log in throught the bridge rather than the direct SMF URL. When I tried using the package manager when logged in through the bridge it was giving me a "Session Verification Failed. Please log out and in again." error. When I went in direct without the bridge it worked fine.
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

silentz

#17
SMF is still reporting "You were unable to login. Please check your cookie settings." on login on both IE and Firefox. I've tried it on a couple of computers with the same result. The only exception is when the redirect goes to Joomla instead of SMF on login as per the registration settings.

I've got it narrowed down to something to do with standard SEF URL's though. I turn them on, I get the session validation error / unable to log on (always when logging on through SMF, only sometimes when logging in through the bridge). I turn them off and all works fine. I've searched both thse boards and Joomla's forums and found a few posts on SEF, the bridge and 1.08, but none that seemed to fit this problem.

I'm using:

Joomla 1.08 (gzip off, sef on, no 3'rd party sef, in a subdirectory)
SMF 1.1 RC2 (gzip off, sef off)
Bridge 1.13 (SMF registration, groups are synched, redirect to SMF on login, Joomla on logout)

Mod_rewrite is working for my install of oscommerce, so I know that works.
I've made the suggested changes to .htaccess, leaving me with:

##  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} ^(/joomladir/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} ^(/joomladir/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


Any ideas greatly appreciated! (Oristo, If you feel like taking a look, I've PM'ed you a link.)

Cheers
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

paki

try commenting out "Options FollowSymLinks".. i had two problems with that line when i started the SEF, and ever since i commented it out its been working properly. YMMV though
http://www.dfwhyundais.com <-- Dallas/Ft. Worth's Local Hyundai Group

Orstio

Quote## 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.

You should probably comment out the lines after that.

silentz

Thanks for the suggestions guys.

Commenting out the standard SEF section gives me a 404 on login (which is odd, as I do have joomla in a directory, but don't have folders called "content" or "component").

Commenting out the FollowSymLinks doesn't seem to change anything.

I've tried uninstalling and reinstalling the whole bridge, but still getting the same result.  ???
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

Orstio

#21
How are you commenting them out?

I just checked your site, and you have something terribly wrong.

In the login module, the Itemid for the bridge component is 1.  It should never be 1.  The frontpage component is 1.

In the menu at the top of the page, the Itemid is 91.

Also in the menu at the top of the page is a link to the bridged SMF calendar.  The Itemid for that is 40.

If you had this installed properly, all the Itemids would be the same, and certainly not a value of 1.

silentz

#22
Like this:

#  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} ^(/joomladir/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} ^(/joomladir/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
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

silentz

OK,

I guess I'll try another uninstall and re-install and let you know how it goes. As to the itemID's... No idea.  ???

Thx for taking a look btw.
(Currently): Joomla 1.0.12 | SMF 1.1 Final | Bridge 1.16 | Life .31 Alpha
"Am I really the only one to ever wonder what a Wookie would look like shaved?"

paki

#24
Quote from: silentz on April 20, 2006, 05:04:37 AM
OK,

I guess I'll try another uninstall and re-install and let you know how it goes. As to the itemID's... No idea.  ???

Thx for taking a look btw.

Your HTACCESS file seems may need to be changed once more. Check it out

This is what you have under Standard SEF:

########## 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} ^(/joomladir/component/option,com) [NC,OR] ##optional - see notes##
# RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
# RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section


Here is my Standard SEF, unedited (except uncommenting one line)

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


This line:

RewriteCond %{REQUEST_URI} ^(/raw-food-news/component/option,com) [NC,OR]       ##optional - see notes##

Try it without the /joomladir in it
http://www.dfwhyundais.com <-- Dallas/Ft. Worth's Local Hyundai Group

Advertisement: