Title: [Plugin: Magento WordPress Integration] Session issues
Last modified: August 20, 2016

---

# [Plugin: Magento WordPress Integration] Session issues

 *  [twistedindustries](https://wordpress.org/support/users/twistedindustries/)
 * (@twistedindustries)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-magento-wordpress-integration-session-issues/)
 * How do I make use of the magento session? I have a plugin that uses:
    add_action(‘
   init’, ‘session_start’ );
 * Which breaks the entire site and I get this in my error log:
    PHP Fatal error:
   Mage_Core_Model_Session_Abstract::getMessages() [[mage-core-model-session-abstract.getmessages](https://wordpress.org/support/topic/plugin-magento-wordpress-integration-session-issues/mage-core-model-session-abstract.getmessages?output_format=md)]:
   The script tried to execute a method or access a property of an incomplete object.
   Please ensure that the class definition “Mage_Core_Model_Message_Collection” 
   of the object you are trying to operate on was loaded _before_ unserialize() 
   gets called or provide a __autoload() function to load the class definition in/
   chroot/home/hifriend/hifrienddesign.com/html/new/app/code/core/Mage/Core/Model/
   Session/Abstract.php on line 215
 * Can you tell me how to properly use the session with this plugin? I am still 
   using 1.0.3 of the plugin.
 * Thanks!
 * [http://wordpress.org/extend/plugins/magento-wordpress-integration/](http://wordpress.org/extend/plugins/magento-wordpress-integration/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [immaterialthought](https://wordpress.org/support/users/immaterialthought/)
 * (@immaterialthought)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-magento-wordpress-integration-session-issues/#post-2851165)
 * I am having a similar issue with 2.0.4 I was running version 1.0.3 successfully,
   but when I try to upgrade my site to 2.0.0 – 2.0.4 I get session errors like 
   above.
 * `Fatal error: Mage_Core_Model_Session_Abstract::getMessages() [<a href='mage-
   core-model-session-abstract.getmessages'>mage-core-model-session-abstract.getmessages
   </a>]: The script tried to execute a method or access a property of an incomplete
   object. Please ensure that the class definition &quot;Mage_Core_Model_Message_Collection&
   quot; of the object you are trying to operate on was loaded _before_ unserialize()
   gets called or provide a __autoload() function to load the class definition in.........................
   app/code/core/Mage/Core/Model/Session/Abstract.php on line 215`
 *  Plugin Author [James Kemp](https://wordpress.org/support/users/jamesckemp/)
 * (@jamesckemp)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-magento-wordpress-integration-session-issues/#post-2851171)
 * Hi twistedindustries,
 * The sessions are automatically initiated when the plugin is configured. You can
   use any of the usual Magento code snippets to check session data. What is it 
   in particular you are trying to retrieve?
 * immaterialthought – it may be that you are using another WordPress plugin that
   initiates a session? If so, this will indeed cause a conflict. unfortunately 
   there is no way to get Magento sessions into WordPress if you have another plugin
   starting a session as well. It may be a good idea for me to add a “disable sessions”
   toggle, if people intend to use this extension without needing the sessions?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Magento WordPress Integration] Session issues’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/magento-wordpress-integration_1f262e.
   svg)
 * [Magento Wordpress Integration](https://wordpress.org/plugins/magento-wordpress-integration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/magento-wordpress-integration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/magento-wordpress-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/magento-wordpress-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/magento-wordpress-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/magento-wordpress-integration/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [James Kemp](https://wordpress.org/support/users/jamesckemp/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-magento-wordpress-integration-session-issues/#post-2851171)
 * Status: not resolved