• Resolved calou82

    (@calou82)


    Since a few days,

    Problem:

    1. Add item to cart
    2. Go to cart page
    3. Increase quantity to 2 with arrows
    4. Page reloads
    5. Blank screen on some computers, not all computers

    With DEBUG mode:

    Warning: foreach() argument must be of typearray|object, falsegiven in/home/xxxxx/web/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart.php on line 357

    Fatal error: Uncaught TypeError: sort(): Argument #1 ($array) must be of type array, false given in /home/xxxxx/web/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart.php:366 Stack trace: #0 /home/xxxxx/web/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart.php(366): sort(false) #1 /home/xxxxx/web/wp-content/plugins/wordpress-simple-paypal-shopping-cart/includes/wpsc-misc-functions.php(16): wpsc_cart_actions_handler() #2 /home/xxxxx/web/wp-includes/class-wp-hook.php(341): wp_cart_init_handler('') #3 /home/xxxxx/web/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #4 /home/xxxxx/web/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #5 /home/xxxxx/web/wp-settings.php(742): do_action('init') #6 /home/lespassik/web/wp-config.php(109): require_once('/home/xxxxx...') #7 /home/xxxxx/web/wp-load.php(50): require_once('/home/xxxxx...') #8 /home/xxxxx/web/wp-blog-header.php(13): require_once('/home/xxxxx...') #9 /home/xxxxx/web/index.php(17): require('/home/xxxxx...') #10 {main} thrown in /home/xxxxx/web/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart.php on line 366

    And in apache log: 500 error code …

    93.8.28.204 www.les-passions.fr - [11/Dec/2025:09:02:34 +0100] "POST /fr/boutique/panier/ HTTP/1.1"500 2621 "https://www.les-passions.fr/fr/boutique/panier/""Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"

    93.8.28.204 www.les-passions.fr - [11/Dec/2025:09:02:35 +0100] "GET /favicon.ico HTTP/1.1"302 - "https://www.les-passions.fr/fr/boutique/panier/""Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"

    93.8.28.204 www.les-passions.fr - [11/Dec/2025:09:02:41 +0100] "GET /fr/boutique/panier/ HTTP/1.1"200 20366 "https://www.les-passions.fr/fr/product/coffret-jean-gilles/""Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"

    93.8.28.204 www.les-passions.fr - [11/Dec/2025:09:02:45 +0100] "GET /fr/boutique/ HTTP/1.1"200 23271 "https://www.les-passions.fr/fr/boutique/panier/""Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"

    93.8.28.204 www.les-passions.fr - [11/Dec/2025:09:02:49 +0100] "GET /fr/product/coffret-jean-gilles/ HTTP/1.1"200 25271 "https://www.les-passions.fr/fr/boutique/""Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"

    93.8.28.204 www.les-passions.fr - [11/Dec/2025:09:02:54 +0100] "POST /fr/product/coffret-jean-gilles/ HTTP/1.1"302 - "https://www.les-passions.fr/fr/product/coffret-jean-gilles/""Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"

    93.8.28.204 www.les-passions.fr - [11/Dec/2025:09:02:55 +0100] "GET /fr/boutique/panier/ HTTP/1.1"200 22054 "https://www.les-passions.fr/fr/product/coffret-jean-gilles/""Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"

    93.8.28.204 www.les-passions.fr - [11/Dec/2025:09:02:59 +0100] "POST /fr/boutique/panier/ HTTP/1.1"500 2621 "https://www.les-passions.fr/fr/boutique/panier/""Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0"

    Simple Shopping Cart Version 5.2.4
    WordPress 6.9

    It worked perfectly a few weeks ago.

    I have added these lines to wp_shopping_cart.php after line 356:

    $products = $wpsc_cart->get_items();
    if (!$products) {
    wp_die(‘Erreur inatendue, maintenance en cours…’);
    }

    Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us and reporting this issue. I have submitted a message to the developers to investigate further your findings.

    Kind regards.

    I can’t reproduce this on my site. If there is an issue, it would happen all the time. The fact that it is happening sometimes means there could be some kind of conflict or caching related issue.

    Does your site have any kind of caching?

    https://www.tipsandtricks-hq.com/ecommerce/impact-of-caching-on-e-commerce-sites

    Or does it happen with a particular product only?

    edwardsmark

    (@edwardsmark)

    @calou82, pls try this again using incognito mode & see if you get the same results.

    Thread Starter calou82

    (@calou82)

    Hi, thanks for reply

    The problem stems from the ‘simple_cart_id’ cookie: it’s necessary for the page to function correctly. If the user doesn’t accept it, the page doesn’t retrieve the cart ID and displays a blank page.
    You can test this by modifying your cookie settings and accepting all cookies; it should work then.
    Would it be possible to manage ‘simple_cart_id’ as a POST variable ?

    Or is there another solution?

    TIA

    Thread Starter calou82

    (@calou82)

    The plugin used to manage the cookies is ‘CookieYes’. You can see what it is saying about ‘simple_cart_id’ :

    Cookie Id : simple_cart_id
    Domain : les-passions.fr
    Duration: passé(e)
    Description : Description is currently not available. 
    Script URL pattern: Not available

    This cookie does not have a script URL pattern. It is required for blocking the cookie prior to obtaining user consent .

    Oh, I see what you mean. The shopping cart plugin requires cookies to function properly, so it won’t work if cookies are disabled or blocked on your site.

    If cookies cannot be used, you’ll need to switch to an alternative solution. As a good option, try our WP Express Checkout plugin, which allows direct checkout for individual products without any cart functionality—and therefore without requiring cookies:

    https://wordpress.org/plugins/wp-express-checkout/

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

The topic ‘5.2.4 bug: Blank screen after after modified qty’ is closed to new replies.