How to resolve issues that appeared after updating to Magento 2.4.8?

How to resolve issues that appeared after updating to Magento 2.4.8?

In Magento 2.4.8, some core bugs were found that can be reproduced in plain vanilla environment:
1. Issue #39817: Ignored .less styles with min-width: (@screen__l)
This issue occurs when Magento 2.4.8 ignores styles defined in .less files with the media query min-width: (@screen__l). As a result, certain responsive styles are not applied, leading to inconsistent or broken layouts on larger screens;
2. Issue #39806: Store switcher not working
This issue arises when switching between stores using the store switcher functionality. Instead of loading fresh content for the selected store, Magento serves the page from the cache, displaying outdated or incorrect content.

How Amasty extensions are affected

  1. In One Step Checkout, 2 and 3-column layouts are displayed in 1 column;
  2. Bundle packs from Automatic Related Products that are configured to be shown for selected customer groups aren't displayed on CMS pages;
  3. In all Amasty extensions, .less styles fail to apply, causing broken layout and inconsistent styling.

Solution

We have created a fix for these core bugs that is available to everyone. This fix can be installed via composer using the following command:
composer require amasty/module-mage-248-fix -W

Finish the installation by running the following Magento commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

A package with this fix can also be downloaded manually from Amasty GitHub. If you're using manual upload, make sure that you already have Amasty_Base module installed in your environment, it is required for correct work. Once the package downloaded, place it in app/code/Amasty/Mage248Fix directory in your Magento root, and run this sequence of commands:
composer require wikimedia/less.php:^5.3.1
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

Notes
Amasty_Mage248Fix package addresses bugs from core Magento 2.4.8 only. When it comes to compatibility of separate Amasty extensions with Magento 2.4.8, such compatibility fixes are added to respective extension packages directly, which we are currently working on. For this reason, we recommend keeping all our modules up-to-date, installing newest versions as soon as they're released.