• Hello,

    I’m in the process of trying to update a woefully out-of-date WP installation (4.5.2). The site is currently running a custom mu-plugin to integrate user accounts/sessions from Magento.

    This plugin is currently working on WP versions up to 4.5.2, but is causing issues on 5.1.1. The code in question can be found all around but looks something like this:

    
    require_once('app/Mage.php');
    umask(0);
    Mage::app("default");
    Mage::getSingleton('core/session', array('name' => 'frontend'));
    
    $wp_mage_session = Mage::getSingleton('customer/session', array('name' => 'frontend'));
    $wp_mage_session -> start();
    

    It appears the umask call and the sessions start calls are impacting WPs autoloader for classes. When these calls are included I get class not found errors.

    Are there changes around session management in 5.1.1 that I should be aware of and haven’t found?

Viewing 5 replies - 1 through 5 (of 5 total)
  • WP doesn’t have an autoloader for classes, and it doesn’t use sessions.
    It could be conflicting with other plugins that do, though.
    You could try the WP Downgrade plugin to easily target other WP versions in between 4.5.2 and 5.1.1, to determine if it is WP. If you go to 4.9.10 and it works, there might be something in the mess of new code for the new editor that loads things differently.
    You could troubleshoot plugin conflicts using the Health Check plugin, which can disable plugins for your user only, without affecting site visitors.

    Thread Starter EL45

    (@el45)

    Thank you for your response. I was referring to https://github.com/WordPress/WordPress/blob/master/wp-includes/class-requests.php#L138 Which is failing to locate classes such as “Requests_Cookie_Jar”, maybe autoloader is the incorrect term?

    I appreciate the tips for plugins to try. I will give that a shot.

    Thread Starter EL45

    (@el45)

    Yeah, you are looking at that word ‘session’, but it is not the same kind of session. The user session token is the hash that is stored in a cookie. Also sessionStorage is the browser storage (like localStorage but it goes away when you close the browser). And the recovery mode session is also a hash for a cookie, but it isn’t released yet, as it’s for version 5.2.

    Thread Starter EL45

    (@el45)

    Apologies. In my head, a session is how you stay logged into a site via cookies, filesystem etc…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Session changes in 5.1.1? Problems integrating 3rd party sessions’ is closed to new replies.