• Resolved dvmorris1

    (@dvmorris1)


    Hi.
    I currently use Exchange V1.35.8 with a small number of other plugins on an art club website which I agreed to take over support from the guy who built it (ie I didn’t set it up and so not totally sure about all the detail). It had been working happily for 6 months or so when we got a few users getting the Fatal Error listed below when entering the Shopping Cart. The users have at least 1 item in the cart but I cant see what it is. I recently deleted some products (last Terms courses) and I am wondering if these users may have had the old product sitting in their cart. I need to clear the problem so they can buy more courses (products).
    I deactivated other plugins to test and error persisted. There have been no mods to plugins (to the best of my knowledge.) Problem occurs in a number of OS and browsers.
    Any ideas?
    Thanks
    ————– copy of error ——
    Fatal Error (hide details) (remove)

    The site encountered a problem that it cannot recover from. Please use the following information to try to resolve the problem.
    Error Message

    Fatal Error: Uncaught Error: Call to a member function supports_feature() on boolean in /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/cart.php:412 Stack trace: #0 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/theme/cart-item.php(162): it_exchange_get_max_product_quantity_allowed(false, ‘488-40cd750bba9…’) #1 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/theme.php(170): IT_Theme_API_Cart_Item->quantity(Array) #2 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/lib/templates/content-cart/elements/item-quantity.php(22): it_exchange(‘cart-item’, ‘quantity’) #3 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-includes/template.php(574): require(‘/homepages/13/d…’) #4 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/lib/functions/template-function in /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/cart.php on line 412

    Description

    The iThemes Exchange plugin code created an error that caused PHP execution to fail.
    Solutions

    Invalid code modifications can cause this problem. If you have made any modifications to the plugin, remove them and try to load the site again.
    It is possible that this plugin’s code is out of date and that an upgrade is available. Check with the plugin’s author to see if an upgrade is available.
    There may be a conflict with another plugin running on the site. Try upgrading the other plugins on the site. A plugin conflict can be ruled out by deactivating all the other active plugins on the site and checking to see if the error still occurs.
    The iThemes Exchange plugin may not have been fully uploaded. Uploading the plugin again could fix the issue. Important: If you do this, you will lose any modifications made to the plugin.

    Error Source Details
    Type Plugin
    Name iThemes Exchange
    Version 1.35.8
    Author iThemes
    Path /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange
    File api/cart.php
    Other Software Details
    WordPress Version 4.5.4
    PHP Version 7.0.14
    Full Error Details
    Type Fatal Error (E_ERROR)
    Message Uncaught Error: Call to a member function supports_feature() on boolean in /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/cart.php:412 Stack trace: #0 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/theme/cart-item.php(162): it_exchange_get_max_product_quantity_allowed(false, ‘488-40cd750bba9…’) #1 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/theme.php(170): IT_Theme_API_Cart_Item->quantity(Array) #2 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/lib/templates/content-cart/elements/item-quantity.php(22): it_exchange(‘cart-item’, ‘quantity’) #3 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-includes/template.php(574): require(‘/homepages/13/d…’) #4 /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/lib/functions/template-function
    File /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/cart.php
    Line 412
    Type Description This type of error indicates that PHP cannot continue to run the code. Typical causes of this type of error are code bugs that have typos, missing or incomplete files (such as a file that was only partially uploaded), and the code using more memory than it is allowed.

    Note that this message is generated by iThemes.com products when an error is encountered on the site. While an iThemes product is generating this message, it is not necessarily the cause of the problem.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Elise Alley

    (@ecalley)

    Hi,

    The latest version of Exchange is 1.36.1. Is there a specific reason you haven’t updated? If not, I would suggest updating to the most recent version of Exchange.

    In the usermeta table, there is a meta_key, _it_exchange_cached_cart. If you remove this, it should remove any carts that are cached.

    Give that a try and let us know how it goes.

    Thanks,

    Elise

    Thread Starter dvmorris1

    (@dvmorris1)

    Hi,

    Thanks Elise. I haven’t upgraded to the latest version simply because I have taken over someone else’s work here and I am trying to change things as little as possible until I am familiar with it. .. but I do intend to move the plugin(s) to the latest version.

    RE: usermeta table. I’ve listed this using sql Every user seems to have a row with this meta_key. When you say ” remove this”, do you mean remove the data in meta_value (for the problem users) or do you mean delete the whole row (for the problem users).

    Understandably I’m cautious about manipulating the raw data without knowing the impact on the applications.

    Thanks for the help.
    David

    Plugin Author Elise Alley

    (@ecalley)

    Hi David,

    I certainly understand your trepidation.

    You can just remove the data, you don’t need to remove the whole row.

    Let me know how it goes.

    Thanks,

    Elise

    Thread Starter dvmorris1

    (@dvmorris1)

    Hi Elise. Still have an error. Removed the following.

    User ID 293 Meta_key _it_exchange_cached_cart Meta_value a:4:{s:7:”cart_id”;a:1:{i:0;s:27:”1478646407008458225a8702110″;}s:28:”pps_transient_transaction_id”;a:1:{i:0;s:27:”1478646413899358225a8ddb904″;}i:0;a:1:{i:0;s:0:””;}s:8:”products”;a:3:{s:36:”488-40cd750bba9870f18aada2478b24840a”;a:6:{s:15:”product_cart_id”;s:36:”488-40cd750bba9870f18aada2478b24840a”;s:10:”product_id”;i:488;s:13:”itemized_data”;s:6:”a:0:{}”;s:15:”additional_data”;s:6:”a:0:{}”;s:13:”itemized_hash”;s:32:”40cd750bba9870f18aada2478b24840a”;s:5:”count”;i:1;}s:36:”334-40cd750bba9870f18aada2478b24840a”;a:6:{s:15:”product_cart_id”;s:36:”334-40cd750bba9870f18aada2478b24840a”;s:10:”product_id”;i:334;s:13:”itemized_data”;s:6:”a:0:{}”;s:15:”additional_data”;s:6:”a:0:{}”;s:13:”itemized_hash”;s:32:”40cd750bba9870f18aada2478b24840a”;s:5:”count”;i:1;}s:37:”2339-40cd750bba9870f18aada2478b24840a”;a:6:{s:15:”product_cart_id”;s:37:”2339-40cd750bba9870f18aada2478b24840a”;s:10:”product_id”;i:2339;s:13:”itemized_data”;s:6:”a:0:{}”;s:15:”additional_data”;s:6:”a:0:{}”;s:13:”itemized_hash”;s:32:”40cd750bba9870f18aada2478b24840a”;s:5:”count”;i:1;}}}

    Came up with different Fatal Error
    Error Message
    Fatal Error: Call to a member function supports_feature() on a non-object in /homepages/13/d634055017/htdocs/clickandbuilds/WordPress/PACC/wp-content/plugins/ithemes-exchange/api/cart.php on line 412

    Any ideas?
    David

    Plugin Author Elise Alley

    (@ecalley)

    Hi David,

    Can you also drop both the user meta and the sessions in wp_options for those users?

    Can you also ask if he can confirm if the product he deleted has in ID of 488? The options have a key matching _it_exchange_db_session_* or for products ids 488, 334, 2339.

    Let me know how it goes.

    Thanks,

    Elise

    Thread Starter dvmorris1

    (@dvmorris1)

    Hi Elise.
    I think you are overassumiing the extent of my knowledge of WordPress.

    “Drop user meta and the sessions in wp_options” – I need more explanation of what is required here.

    Which table holds the ID code for products? Anyway if I have binned and then deleted the products (using the exchange application) would they still be in the table anyway?

    Don’t understand what I have to do to answer this question: “Can you also ask if he can confirm if the product he deleted has in ID of 488? The options have a key matching _it_exchange_db_session_* or for products ids 488, 334, 2339.”

    Sorry.

    A number of other users have now experienced this “fatal error” problem while trying to buy product. Not sure that they will all be due to old deleted products sitting in cached carts but can’t be sure. Will try to do more testing with dummy users.

    Thanks for suggestions so far.
    David

    Thread Starter dvmorris1

    (@dvmorris1)

    Further checking seems that all users with fatal error have old deleted products (signified by 3 digits eg 334,309, 488) in _it_exchange_cached_cart. Longer 4 digit product numbers (eg 2345, 2339) are current products in store. Can’t think of a sql search to list all userswith these products in shopping carts. Any further advice on how to purge these? Happy to purge all current shopping carts contents if there is a way.

    Thanks
    David

    Plugin Author Elise Alley

    (@ecalley)

    Hi David,

    Sorry for the confusion.

    You can purge all the cart contents using

    it_exchange_db_delete_all_sessions()

    wrapped in an init hook. So it would be like this:

    add_action( ‘init’, ‘it_exchange_db_delete_all_sessions’ );

    Give that a try and let me know how it goes.

    Thanks,

    Elise

    Thread Starter dvmorris1

    (@dvmorris1)

    Hi Elise.

    Thanks for this. IS this clearing the cart contents for each user as they log onto the WordPress application on our site or clearing all contents of all carts? (I’m guessing the former?)

    Secondly. Although I’ve done some programming in the past I am not familiar with PHP and WordPress. Do I add the code line you gave me ie:
    add_action( ‘init’, ‘it_exchange_db_delete_all_sessions’ );
    into wp_setting.php? …Does it need to be before do_action (‘init’)?

    Plugin Author Elise Alley

    (@ecalley)

    Hi David,

    This code will clear all the sessions in the database. So it will empty any carts that are currently in the database and will log out anyone currently logged in.

    You would simply add that exact code to the bottom of your theme’s functions.php file. Just add_action( ‘init’, ‘it_exchange_db_delete_all_sessions’ );

    Let me know how it goes.

    Thanks,

    Elise

    Thread Starter dvmorris1

    (@dvmorris1)

    Hi Elise. Added the suggested code to functions.php in my Theme (Canape). Logged out, closed browser and flushed cache and then reopened our WP website and logged in. No apparent change. Still fatal errors. Still suggesting there are items in the shopping cart and looking at data in SQL database it looks like all is unchanged on record with metakey _it_exchange_cached_cart.

    Do I need to do something special to cause functions.php to run?
    Copy of code entered is shown below
    ——extract from end of functions.php—–
    add_action( ‘pre_get_posts’, ‘canape_menu_posts’ );

    /**
    * Load plugin enhancement file to display admin notices.
    */
    require get_template_directory() . ‘/inc/plugin-enhancements.php’;

    /**
    * TEmp update to clear carts
    */
    add_action( ‘init’, ‘it_exchange_db_delete_all_sessions’ );

    Thread Starter dvmorris1

    (@dvmorris1)

    Hi Elise,

    Sent off account details in email to you as requested.

    David

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Fatal Error – Shopping Cart -iThemes Exchange’ is closed to new replies.