magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.52k stars 9.31k forks source link

Error during app:config:import -- Import failed #35993

Closed densen45 closed 1 year ago

densen45 commented 2 years ago

Preconditions and environment

Steps to reproduce

The steps to reproduce this issue are described very well by @hostep in https://github.com/magento/magento2/issues/31428#issuecomment-866144213.

Expected result

The import of the config runs without any errors.

Actual result

The import of the config does not work but produces the following error:

Import failed: Notice: Trying to access array offset on value of type null in [..]/vendor/magento/module-config/Model/Config/Backend/Currency/Cron.php on line 66

Additional information

There is a corresponding issues that was already fixed in https://github.com/magento/magento2/issues/31428. However, we discovered that only part of the issue was fixed yet (see https://github.com/magento/magento2/issues/31428#issuecomment-1013057304 and https://github.com/magento/magento2/issues/31428#issuecomment-1212996021).

Release note

No response

Triage and priority

m2-assistant[bot] commented 2 years ago

Hi @densen45. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 2 years ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Delta commented 2 years ago

Hi @densen45 , Thank you for raising an issue . We tried to reproduce the issue on magento 2.4 develop but issue is not reproducible. import was successful.

Steps followed: Steps to reproduce on latest 2.4-develop:

  1. Setup clean Magento from 2.4-develop branch (I've used commit https://github.com/magento/magento2/commit/f121ac8359768b5ebcc7462574e58c36f34c52df)
  2. After Magento is up and running, execute bin/magento app:config:dump
Screenshot 2022-08-23 at 7 27 42 PM Screenshot 2022-08-23 at 7 26 38 PM
  1. Manually change the app/etc/config.php file like this: --- app/etc/config.php.orig 2021-06-22 18:28:35.000000000 +0200 +++ app/etc/config.php 2021-06-22 18:28:42.000000000 +0200 @@ -1302,8 +1302,8 @@ ], 'generate' => [ 'enabled' => '0',
    • 'time' => null,
    • 'frequency' => null,
    • 'time' => '03,07,00',
    • 'frequency' => 'D', 'error_email_identity' => 'general', 'error_email_template' => 'sitemap_generate_error_email_template', ], @@ -4023,7 +4023,7 @@ 'jobs' => [ 'sitemap_generate' => [ 'schedule' => [
    • 'cron_expr' => '0 0 *',
    • 'cron_expr' => '7 3 *', ], ], ],
  2. Try to import those changes by using: bin/magento app:config:import
  3. We got below output:
Screenshot 2022-08-23 at 7 26 38 PM

Processing configurations data from configuration file... Import failed: Notice: Trying to access array offset on value of type null in app/code/Magento/Cron/Model/Config/Backend/Sitemap.php on line 78

hostep commented 2 years ago

@engcom-Delta: please read the last couple of comments in https://github.com/magento/magento2/issues/31428 very carefully

Yes, it was fixed for the sitemap generation cron, but it most likely wasn't fixed for the currency rates update cronjob, or for the log cleanup cronjob, or for the backups cronjob.

m2-assistant[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Hotel commented 2 years ago

Hello @hostep,

Thanks for the detailed information on this issue as well as on https://github.com/magento/magento2/issues/31428.

Hello @densen45,

We have checked this issue in the latest development branch ie 2.4-develop and for us, the issue is reproducible for currency rates cron, we are updating the issue description and confirming the issue.

Note: The issue seems not reproducible for backups & log clear.

Thanks

github-jira-sync-bot commented 2 years ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-6588 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 years ago

:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

glo35082 commented 2 years ago

Thanks for confirming the issue. Our internal team has already started looking into the issue. We will update very soon.

armpogart commented 2 years ago

@engcom-Hotel Is there any chance that patches for #31428 (PR - AC-988::Fixing app:config:import issue after config dump and later patch for this one will be added to 2.3.7 patch releases or quality-patches?

hostep commented 1 year ago

Closed without comments? (again @sdzhepa, please end this situation!!! All issue closings should have a comment explaining why!!!)

But most likely fixed by AC-6588: Error during app:config:import -- Import failed

engcom-Hotel commented 1 year ago

Hello,

As I can see this issue got fixed in the scope of the internal Jira ticket AC-6588 by the internal team Related commits: https://github.com/magento/magento2/search?q=AC-6588&type=commits

Based on the Jira ticket, the target version is 2.4.6.

Thanks