Guest views

Discussion in 'Technical Support' started by bajaboy1, Feb 5, 2010.

Thread Status:
Not open for further replies.
  1. John Snyder Staff

    As per my tests in FF and Safari for Mac an IE8 for Media Center :

    Login with or without clicking the remember button - Cookie is set for remember, quit the window and or quit the application Login is remembered and I don't have to login.

    This tells me that if you have the latest FF or Safari for Mac or IE8 for Media Center and you don't get this result it is a browser settings issue. See test.templatecodes.com as a default new install of 68C, username test password test. Due to the way the form is processed in login.php the remembered value will either be '' or 'Y'. The login object checks for a value that is <> 'N' thus you will always have a cookie set.

    Login.php:
    PHP:
    if ($remember <> 'N') {
        
    $this->_setCookie();
    }
    To fix this problem you can open login.php:

    find:
    PHP:
    $remember=trim(@$_POST['remember']);
    replace with:
    PHP:
    //data has been filled
    $remember 'N';
    if (isset(
    $_POST['remember'])) {
        
    $remember=trim(@$_POST['remember']);
    }
  2. John Snyder Staff

    As for the issue of the broken views. I haven't reproduced on my machine/install, Can you tell me, what version of PHP you are running and can you please add these to the template and report back the values when the view is broken? I only need to know what they are on the broken view, ie only view listing link appears and images and etc are missing.

    If you could add this in a template (layout.tpl), {$smarty.session.userlevel} it will output the variable that is checked for the display settings, it should appear in the upper left corner of screen.

    Add this to the template (layout.tpl) {debug} and turn off popup blocker to see and tell me the values for the following variables:

    sDisPhoto
    sDisTitle
    sDisPrice
    sDisDateAdded
    sDisExpiration
    sDisCity
    sDisState
    sDisCountry



    I'll see if I can't track down how this is occurring, please be patient as I don't have a lot of consecutive time to address support issues today. Sorry before hand if any of this info has been provided, the thread is quite long and I don't have time just yet to read it all.
  3. bowers01 Genius At Work

    Hi,
    The debug looks normal even though they are not showing
    But the important thing is that {$smarty.session.userlevel} shows blank when the problem occors.
    So that is the issue
  4. nzyan Customer

    php -v
    PHP 5.2.6-1+lenny4 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 22 2009 01:50:58)


    I added:
    Code:
    <!-- {$smarty.session.username}  | {$smarty.cookies.username} | {$smarty.session.userlevel}-->
    And I received:
    Code:
    <!--   |  | -->
    = Nada...

    It's all "null"...

    Code:
    {$sDisCity}	null
    {$sDisCountry}	null
    {$sDisDateAdded}	null
    {$sDisExpiration}	null
    {$sDisPhoto}	null
    {$sDisPrice}	null
    {$sDisState}	null
    {$sDisTitle}	null
  5. Lhotch curmudgeon

    Exactly, and this goes back to my post above about taking control of your sites sessions. Cookies are only half the picture.
  6. John Snyder Staff

    Solution - Issue Resolved

    It looks like this problem is the result of magic quotes gpc being turned on. I've tested it on one site and this solved the problem:

    via .htaccss
    php_flag magic_quotes_gpc Off

    via php.ini

    magic_quotes_gpc = Off

    See here for more information about disabling magic quotes: PHP: Disabling Magic Quotes - Manual
    1 people like this.
  7. nzyan Customer

    Solved

    That did it - many thanks to John for finding this out!

    Best regards from Bonn, Germany
    Andreas
Thread Status:
Not open for further replies.

Share This Page