Skip to content

Notice or user deprecation causing report page #33812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 tasks
ihor-sviziev opened this issue Aug 16, 2021 · 2 comments
Closed
5 tasks

Notice or user deprecation causing report page #33812

ihor-sviziev opened this issue Aug 16, 2021 · 2 comments
Labels
Issue: ready for confirmation Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.

Comments

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Aug 16, 2021

This is a follow-up on #31985. That issue caused such big issue due to handling notices, deprecation, or user deprecation as an exception.

According to https://www.php.net/manual/en/errorfunc.constants.php, it feels like we should treat the following types as a non-critical issue and just add a log message to the log file:

  • E_NOTICE
  • E_USER_NOTICE
  • E_DEPRECATED
  • E_USER_DEPRECATED

It's better to convert these types to exceptions only in developer mode

Not sure if it's good or bad thing, would like to discuss it

Preconditions (*)

  1. Magento 2.3.7-p1, 2.4.3, 2.4-develop
  2. Production mode enabled
  3. PHP 7.4

Steps to reproduce (*)

  1. Add some code that should trigger notice to the cms/index/index controller, example:
$test = false;
if ($test['some-key']) {
    // some code here 
}
  1. Go to the homepage

Expected result (*)

  1. The homepage should be shown w/o any issues
  2. The Notice message should be written in logs

Actual result (*)

  1. We have Magento report page, and Notice was converted to Exception

Please provide Severity assessment for the Issue as a Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@ihor-sviziev ihor-sviziev added the Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. label Aug 16, 2021
@m2-assistant
Copy link

m2-assistant bot commented Aug 16, 2021

Hi @ihor-sviziev. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

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

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

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

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

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

@ihor-sviziev
Copy link
Contributor Author

It's better to have strict error checking, than having some random issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: ready for confirmation Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
None yet
Development

No branches or pull requests

1 participant