Search

Mar 28, 2023

Magento2 Cloud: Mini Bag is empty after adding any product to cart from the wishlist page

We are using Magento 2.4.4 and got the error: Mini Bag is empty after adding any product to cart from the wishlist page.

Step by steps:
0. Login account
1. Add products to wish list
2. Go to account -> wish list page
3. Click add product to cart from wish list page
4. Expected result: The mini cart will be update the correct qty
5. Actual result: The qty is wrong in mini cart

SOLUTION:

The core magento team has released a fix for this issue. The issue is related to an external js file used with the product recommendation extension. You do not need to do anything on your side to get this fix since it is related to an external js file that is already updated with the fix. 

=> Please contact to Magento support and they will fix it.

Magento2 Cloud: PHP Parse error Command post_deploy.sh returned non-zero exit status 139

Push code to cloud and got the below error

```   
Uploading applications to the remote cluster
      Uploaded application mymagento to the remote cluster
    W: Route '***.cloud' doesn't map to a domain of the project, using default development hostname.
    Deploying applications
      Starting deployment
      Preparing slugs
      Entering maintenance mode
      Running deploy hook
      W: PHP Parse error:  syntax error, unexpected '?' in /app/***/vendor/magento/ece-tools/autoload.php on line 6
      W: Segmentation fault
      E: Failed to run deploy hook
      E: Command '['sudo', '-u', '', 'bash', '-c', '/etc/platform/***/post_deploy.sh']' returned non-zero exit status 139
      Exiting maintenance mode
    E: Error: Cannot complete deployment
Processing activity: Sending webhook
To git.us-3.magento.cloud:***.git
Done
```

SOLUTION:

You've got PHP 8.1 defined in your .magento.app.yaml file, and unfortunately, your cloud cluster doesn't have the version of PHP available and needs to be upgraded to Debian 9 (stretch). 
Contact to magneto2 cloud support and upgraded OS to Debian 9 or more