Session Variable Error in Theme (Resolved)

Discussion in 'GeoCraft WordPress Theme' started by scfadmin, Apr 14, 2013.

  1. scfadmin

    scfadmin Member

    Joined:
    Dec 23, 2012
    Messages:
    57
    Likes Received:
    7
    One of my favorite plugins was failing and I finally tracked it down to an error in the Geocraft theme. Until the support team can correct this, here is how you can patch it yourself.

    Specifically the google_map.php file was setting a session variable without starting a session first. This caused all PHP session variables to be deleted before each page load.

    Make the following change:


    Edit the the google_map.php file located in /geocrafttheme/library/widget/


    Change:
    $_SESSION['count'] = 0;

    To:
    if( !isset( $_SESSION ) ) { // start a PHP session, but only if one is not already started
    session_start();
    }
    $_SESSION['count'] = 0;

    I hope that this helps some of you too!

    - Cary
     
    TSMM likes this.
  2. russmnh

    russmnh Member

    Joined:
    Jan 6, 2013
    Messages:
    30
    Likes Received:
    1
    This worked for me Cary,

    Thanks for the insight.

    Russ
     

Share This Page