-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Event observers fire from disabled modules #9948
Comments
@scottsb Please add more details to your description of the steps you followed when identifying this issue. Screenshots or logs would be helpful, too. |
Is there a particular area you want clarification on? I already provided the steps to reproduce. (For what it's worth, the example I cite of |
OK
Op 5 jul. 2017 21:59 schreef "Scott Buchanan" <notifications@github.com>:
… Is there a particular area you want clarification on? I already provided
the steps to reproduce. (For what it's worth, the example I cite of
Magento_AdminNotification isn't just hypothetical; it's the actual module
we had disabled that caused us to run into this, so you could do the same.)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9948 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS5o-mn9LwrpmiTgutrrjSqlTJ4yYWblks5sK-sqgaJpZM4N6Bts>
.
|
I did just clarify the problem statement in the issue. The fundamental bug is simply that event observers in disabled modules still run. My steps to reproduce illustrate how this can lead to a fatal error, though obviously there are many ways this could fail since code is running that's supposed to be disabled. |
@scottsb, thank you for your report. |
I am working on it #SQUASHTOBERFEST |
I also tried to reproduce this issue on magento 2.3.4 instance but it is not reproducible now |
Magento will still fire observers for disabled modules.
Besides simply triggering unwanted functionality, this can also potentially cause fatal errors if the module was disabled before the install scripts ever ran, as the observer will expect the module to be installed (and any schema/data changes to be applied), which it won't be in this case.
Preconditions
Magento 2.1.3
Steps to reproduce
setup:upgrade
.setup:upgrade
. Because the module is disabled, schema changes will not be made (correctly so).Expected result
Observer is not fired, since module is disabled.
Actual result
Observer is fired, causing a potentially fatal error if it assumes schema changes have occurred.
The text was updated successfully, but these errors were encountered: