Comments Plus

You are apparently incorrectly using session_start() and this causes plugin conflicts.

  • aristath

    If you or someone else claims that there is a bug in one of our plugins, we would really appreciate some more data!

    What is the code that causes this conflict?
    Have you found an error in the code of the Comment Plus plugin? If so, where?
    I'd be happy to report this as an issue so that the plugin developer can work on it and correct it, but I'm going to need some more details!

    I hope to hear from you soon, nobody likes bugs! :slight_smile:

    Cheers,
    Aristeides.

  • glennyboy

    Hi

    There is a direct conflict between this plugin and Jigoshop when adding to Cart. The error returned is:-

    Fatal error: jigoshop_cart::calculate_cart_total() [jigoshop-cart.calculate-cart-total]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "jigoshop_product_variation" 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 /sitel/wp-content/plugins/jigoshop/classes/jigoshop_cart.class.php on line 497

    When uninstalling your plugin this issue disappears. According to Jigoshop this issue is caused by:-

    -----

    Receive an error similar to the one below? The 'incomplete object' or 'unserialize' and 'autoload' are the keys for this issue identification.

    Fatal error: jigoshop_cart::calculate_cart_total() [jigoshop-cart.calculate-cart-total]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "jigoshop_product" 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 /plugins/jigoshop/classes/jigoshop_cart.class.php on line 442

    The proper fix for this is to find (by process of elimination) the plugin that is conflicting - using session_start() incorrectly:

    De-activate plugin by plugin, visit your Shop and 'Add to Cart' a product. Does the site still crash? If so, keep trying all the plugins.

    If the site is down you can de-activate a plugin to bring the site back up by dragging that plugin's folder OUT of the WordPress plugins folder. When you visit the site again, WordPress will de-activate it automatically because it can't find it.

    Once you have found the plugin that when de-activated WILL allow a product to be added to the Cart without bringing down the site, open up it's main plugin file usually named the same as the folder that contains it. For Jigoshop that would be the file 'jigoshop.php' (it could could be in other files the main one loads).

    Find session_start(); . Remove it for now and contact the developer to fix this flaw in their plugin. Point the developer to this thread for a full discussion and various fixes .

    More detailed explanation to fix this issue on this particular Forum post:-

    http://forum.jigoshop.com/discussions/problems/2487-fatal-error-after-upgrade/page/2?to=%2Fdiscussions%2Fproblems%2F2487-fatal-error-after-upgrade#comment_16123355

    ----
    I hope this helps.

    Glennyboy

  • aristath

    Confirmed. I installed jigoshop, created a test product and when I tried adding it to the cart I got an HTTP Error 500 and the following in my error log:

    [Fri Feb 15 12:55:33 2013] [error] [client 127.0.0.1] PHP Fatal error:  jigoshop_cart::calculate_cart_total(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "jigoshop_product" 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 /var/www/wpmudev/wp-content/plugins/jigoshop/classes/jigoshop_cart.class.php on line 497, referer: http://localhost/wpmudev/product/test/

    Thanks for reporting this, I'll pass our findings to the plugin developer so that he can take a look at it. :slight_smile:

    Cheers,
    Aristeides.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.