cancel
Showing results for 
Search instead for 
Did you mean: 

Magento s:d:c

Magento s:d:c

After done some upgrading to 2.4.6-p5 I get suddenly the following compile error

 

Application code generator... 3/9 [=========>------------------] 33% 7 secs 346.0 MiBPHP Fatal error: Class Magento\Framework\Session\SaveHandler\Redis\Config contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Cm\RedisSession\Handler\ConfigInterface::getRetries) in /home/u58658p55525/domains/staging.4youwear.nl/public_html/vendor/magento/framework/Session/SaveHandler/Redis/Config.php on line 16

back to old version..same error..strange that was working well….

 

what is wrong here…

4 REPLIES 4

Re: Magento s:d:c

It's a recent known issue, already reported,, have a look - https://github.com/magento/magento2/issues/38728

Founder at https://agency418.com

Re: Magento s:d:c

Hello @richardnor2653 

 

Please run the following commands:

 

composer require colinmollenhour/php-redis-session-abstract:1.5.5
composer update
php bin/magento s:up
php bin/magento s:d:c
php bin/magento s:s:d -f
php bin/magento c:f

Hope it helps !

If you find our reply helpful, please give us kudos.

 

A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.

 

WebDesk Solution Support Team

Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789

 

Thank You,


WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789


Location: 150 King St. W. Toronto, ON M5H 1J9

Re: Magento s:d:c

Have you solved the problem?

Spoiler
Please ensure that the Cm\RedisSession module is compatible with Magento 2.4.6-p5 and fully implements ConfigInterface. Clear caches and review recent changes for any discrepancies. Seek module updates or support if needed. Need help with your assignments? I recommend https://canadianwritings.com/ Their team of professional writers provides excellent work, and the service is very reliable. The prices are reasonable, and the customer support is always ready to assist. If you’re a student in need of writing assistance, check them out.

Re: Magento s:d:c

Hi @richardnor2653,

The error you're encountering indicates that the class

Magento\Framework\Session\SaveHandler\Redis\Config is missing an implementation for the getRetries method, which is required by the Cm\RedisSession\Handler\ConfigInterface interface. This can happen due to various reasons such as corrupted files, partial updates, or inconsistencies in your vendor directory.

1. Check for File Corruption or Inconsistencies

First, ensure that your vendor directory is consistent and up-to-date. Run the following commands:

composer install

composer dump-autoload

These commands will ensure that all dependencies are properly installed and the autoloader is correctly generated.

2. Verify the Redis Session Configuration

Ensure that your Cm_RedisSession module is correctly configured and up-to-date. Check the composer.json file to make sure it lists the correct version of Cm_RedisSession. You can manually update it if necessary:

composer require colinmollenhour/credis-session

This will install the latest version of the Cm_RedisSession package.

3. Clear Generated Code and Cache

Clear all generated code and Magento caches:

rm -rf var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* pub/static/*
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

4. Inspect Config.php

Manually inspect the Config.php file located at vendor/magento/framework/Session/SaveHandler/Redis/Config.php. Ensure it correctly implements the getRetries method required by the Cm\RedisSession\Handler\ConfigInterface.

namespace Magento\Framework\Session\SaveHandler\Redis;

use Cm\RedisSession\Handler\ConfigInterface;

class Config implements ConfigInterface
{
    // Other methods...

    /**
     * Retrieve the number of retries for failed connection attempts
     *
     * @return int
     */
    public function getRetries()
    {
        // Return the appropriate value based on your configuration
        return 3; // Example value
    }

    // Other methods...
}

Revert to a Known Working State

If the above steps do not resolve the issue, revert to a previous known working state. You can use your version control system (e.g., Git) to revert the codebase to a commit that was known to work.

7. Investigate the Dependency Updates

Review the composer.lock file for any recent updates to colinmollenhour/credis-session or any related packages. It's possible that an update introduced changes that are not compatible with your current Magento version.

the error you're encountering is due to the Magento\Framework\Session\SaveHandler\Redis\Config class not implementing the required getRetries method. Follow the steps outlined above to ensure that your dependencies are correct, clear caches, and verify that the necessary methods are implemented.

If the issue will be resolved, Click Kudos & Accept as a Solution.