1
Xetox
Login Issue
  • 2005/11/2 19:15

  • Xetox

  • Just popping in

  • Posts: 71

  • Since: 2005/10/28


Since the upgrade to the new xoops, I have been having a issue with the redirect after log in.

Could any buddy shine a light on this?

When you log in <you can test this with user id test/test>the you get

Thank you for logging in, T-Roy.
If the page does not automatically reload, please click here


All logos and trademarks in this site are property of their respective owners, all user comments are property of their posters.
Remaining content 2005 gasperinofamily.com. All rights reserved

But it never redirects. YOu have to "Click Here"

2
Xetox
Re: Top Posts
  • 2005/11/2 19:44

  • Xetox

  • Just popping in

  • Posts: 71

  • Since: 2005/10/28


I have just noticed that this happens as well when you log out.

Thanks again in advance!

3
Bender
Re: Login Issue
  • 2005/11/2 20:13

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10


Looking at the source of your redirect page the meta tag for the refresh is missing as far as i can see.

In XOOPS 2.0.x it was located within the file html\modules\system\templates\system_redirect.html

However this seems to be changed in 2.2.x series and there it appears should be within the file \html\include\functions.php
line 423.

Is this the case in your file?
Sorry, this signature is experiencing technical difficulties. We will return you to the sheduled signature as soon as possible ...

4
Xetox
Re: Login Issue
  • 2005/11/2 22:02

  • Xetox

  • Just popping in

  • Posts: 71

  • Since: 2005/10/28


Can you tell me what that code is supposed to look like?

Is this what you are talking about?


$url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_QUOTES));
$xTheme->tplEngine->assign('url', $url);
$message = trim($message) != '' ? $message : _TAKINGBACK;
$xTheme->tplEngine->assign('message', $message);
$xTheme->tplEngine->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
$xTheme->tplEngine->assign('xoops_module_header', '<meta http-equiv="Refresh" content="2; url='.$url.'" />');
$xoopsOption['template_main'] = 'system_redirect.html';
include XOOPS_ROOT_PATH."/footer.php";
exit();

I did a search for refresh in the function.php and found this.

5
dickinsd
Re: Login Issue
  • 2005/11/2 22:28

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


You want a full copy of the functions.php file, or do you just want to check the redirect function (about halfway down the functions.php file)

I'll attach my redirect function from a xooops 2.2.2 site:

/*
* Function to redirect a user to certain pages
*/
function redirect_header($url$time 3$message ''$addredirect true)
{
    global 
$xoopsConfig$xoopsLogger$xTheme$xoopsOption$xoopsModule$xoopsUser$xoopsTpl;
    if (
preg_match('/b(java)?script:/si'$url) ) {
        if (!
preg_match('/^b(java)?script:([s]*)history.go(-[0-9]*)([s]*[;]*[s]*)$/si'$url) ) {
            
$url XOOPS_URL;
        }
    }
    
//$xTheme->tplEngine->assign('xoops_showrblock', 1);

    
$xTheme->tplEngine->assign('time'intval($time));
    if (
$addredirect && strstr($url'user.php')) {
        if (!
strstr($url'?')) {
            
$url .= '?xoops_redirect='.urlencode($_SERVER['REQUEST_URI']);
        } else {
            
$url .= '&amp;xoops_redirect='.urlencode($_SERVER['REQUEST_URI']);
        }
    }
    if (
defined('SID') && (! isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) {
        if (!
strstr($url'?')) {
            
$url .= '?' SID;
        } else {
            
$url .= '&amp;'.SID;
        }
    }
    
$url preg_replace("/&amp;/i"'&'htmlspecialchars($urlENT_QUOTES));
    
$xTheme->tplEngine->assign('url'$url);
    
$message trim($message) != '' $message _TAKINGBACK;
    
$xTheme->tplEngine->assign('message'$message);
    
$xTheme->tplEngine->assign('lang_ifnotreload'sprintf(_IFNOTRELOAD$url));
    
$xTheme->tplEngine->assign('xoops_module_header''<meta http-equiv="Refresh" content="2; url='.$url.'" />');
    
$xoopsOption['template_main'] = 'system_redirect.html';
    include 
XOOPS_ROOT_PATH."/footer.php";
    exit();
}


think thats all you need.

Dave

PS: This extract comes from the yourdomain.com/include/functions.php file.

6
Xetox
Re: Login Issue
  • 2005/11/2 22:36

  • Xetox

  • Just popping in

  • Posts: 71

  • Since: 2005/10/28


I replaced that code in my function.php file but its still not redirecting.

http://gasperinofamily.com login/password test/test

7
jdseymour
Re: Login Issue

I can confirm the page does not redirect at login using the test user you provided in the other thread. Any ideas?

8
dickinsd
Re: Login Issue
  • 2005/11/2 22:56

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


yeah, I notice none of your redirects are working, i.e. when you vote in the polls etc.

I wonder does anyone know if this FAQ might work with the latest xoops?

https://xoops.org/modules/smartfaq/faq.php?faqid=302

That link wont fix the redirect page, it just gets rid of the redirect page - might be worth a shot.

Dave

9
Xetox
Re: Login Issue
  • 2005/11/3 13:24

  • Xetox

  • Just popping in

  • Posts: 71

  • Since: 2005/10/28


Ok I did that, and now it still comes up with the redirect but now when you click on the click here I get
Fatal error: Call to undefined function: redirect_header() in /home/xetox/domains/gasperinofamily.com/public_html/include/functions.php on line 395
So I copy the original functions.php back over and I am still getting
Fatal error: Call to undefined function: redirect_header() in /home/xetox/domains/gasperinofamily.com/public_html/include/functions.php on line 395

any ideas?

10
dickinsd
Re: Login Issue
  • 2005/11/3 13:28

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


OOps

I guess that code was aimed at older version of xoops??

Have you tried clearing your cache folder?

Dave

PS: And do [CTRL + F5] to make sure your not just getting a page that your browser cached up for you.

Login

Who's Online

183 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 183


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits