cancel
Showing results for 
Search instead for 
Did you mean: 

Error when updating to Magento 2.4.0

Error when updating to Magento 2.4.0

I am on Magento 2.3.5-p2 and would like to update to Magento 2.4.0. SSH shows me that I have to use PHP 7.3 or 7.4, for updating to Magento 2.4.0. So I changed my PHP version to PHP 7.3. After this, I get a new message. It says the following:

 

Problem 1

    - magento/framework 102.0.0 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.18) does not satisfy that requirement.

    - magento/framework 102.0.1 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.18) does not satisfy that requirement.

    - magento/framework 102.0.2 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.18) does not satisfy that requirement.

    - magento/framework 102.0.2-p2 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.18) does not satisfy that requirement.

    - mailchimp/mc-magento2 102.3.38 requires magento/framework 102.0.* -> satisfiable by magento/framework[102.0.5-p2, 102.0.4-p2, 102.0.5, 102.0.3-p1, 102.0.4, 102.0.2-p2, 102.0.3, 102.0.2, 102.0.1, 102.0.0].

    - mailchimp/mc-magento2 102.3.38 requires magento/framework 102.0.* -> satisfiable by magento/framework[102.0.5-p2, 102.0.4-p2, 102.0.5, 102.0.3-p1, 102.0.4, 102.0.2-p2, 102.0.3, 102.0.2, 102.0.1, 102.0.0].

    - Can only install one of: magento/framework[102.0.5-p2, 103.0.0].

    - Can only install one of: magento/framework[102.0.4-p2, 103.0.0].

    - Can only install one of: magento/framework[102.0.5, 103.0.0].

    - Can only install one of: magento/framework[102.0.3-p1, 103.0.0].

    - Can only install one of: magento/framework[102.0.4, 103.0.0].

    - Can only install one of: magento/framework[102.0.3, 103.0.0].

    - Can only install one of: magento/framework[103.0.0, 102.0.5-p2].

    - magento/product-community-edition 2.4.0 requires magento/framework 103.0.0 -> satisfiable by magento/framework[103.0.0].

    - Installation request for magento/product-community-edition 2.4.0 -> satisfiable by magento/product-community-edition[2.4.0].

    - Installation request for mailchimp/mc-magento2 102.3.38 -> satisfiable by mailchimp/mc-magento2[102.3.38].

 

I understand that I haver to update Magento/framework to version 103.0.0, to instal Magento 2.4.0. And I also understand, when I would like to update Magento/Framework, I have to use PHP 7.2. But when using composer update on PHP 7.2, it is not updating the framework. How can I update the framework first and then set PHP 7.3 to update to Magento 2.4.0 ?

8 REPLIES 8

Re: Error when updating to Magento 2.4.0

With my laptop?

Re: Error when updating to Magento 2.4.0

This error is fixed. I have updated to Magento 2.4.0. 

 

However, I know have another error. The website works, and the back end shows the admin page. After I logged in, I will get this error:

 

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'MYDATABASENAME.mg_admin_user_expiration' doesn't exist, query was: SELECT `main_table`.*, `user`.`is_active` FROM `mg_admin_user_expiration` AS `main_table`

 

LEFT JOIN `mg_admin_user` AS `user` ON main_table.user_id = user.user_id WHERE (`expires_at` < '2020-08-07 09:49:14') AND (`user`.`is_active` = '1') AND (`main_table`.`user_id` = '1')

 

How can I solve this?

Re: Error when updating to Magento 2.4.0

Because of your upgrade miss table mg_admin_user_expiration. You can try run:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

to upgrade and deploy your website. If it still doesn't work, you can run bellow script in your PHPMyAdmin.

 

CREATE TABLE `mg_admin_user_expiration` (
  `user_id` int(10) UNSIGNED NOT NULL COMMENT 'User ID',
  `expires_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'User Expiration Date'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Admin User expiration dates table';
 
ALTER TABLE `mg_admin_user_expiration`
  ADD PRIMARY KEY (`user_id`);
 
ALTER TABLE `mg_admin_user_expiration`
  ADD CONSTRAINT `ADMIN_USER_EXPIRATION_USER_ID_ADMIN_USER_USER_ID` FOREIGN KEY (`user_id`REFERENCES `admin_user` (`user_id`ON DELETE CASCADE;
COMMIT;
 
Hope it help you!

Re: Error when updating to Magento 2.4.0

Hello,

How did you do to correct this error? what is the solution?

hug

Re: Error when updating to Magento 2.4.0

I have not fixed this problem and restored my shop to version 2.3.5-p2. Magento 2.4.0 requires Elastic Search. The hosting company that I am using does not support this yet.

Re: Error when updating to Magento 2.4.0

Magento 2.4.0 is not working on PHP 7.3 is working on PHP version 7.4 so install PHP 7.4 and your error solved.

Re: Error when updating to Magento 2.4.0

How did you fix the initial problem with the PHP version? That's the exact same issue I am having.

Re: Error when updating to Magento 2.4.0

How the error is solved ?

please share