-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Cache type without "instance" causes exception when disabling the module through "Cache Management" in the backend #26224
Comments
Hi @Serializator. Thank you for your report.
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:
For more details, please, review the Magento Contributor Assistant documentation. @Serializator do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @eduard13. Thank you for working on this issue.
|
Hi @Serializator, I was able to reproduce it, and working on a fix for it. Please note that I've updated the description a bit, by adjusting the path for the XSD file. |
Hi folks. I can confirm that this issue appears. But is there a use case for a cache definition without an implementation? I mean, maybe it's better to throw an exception to notify the developer that the parameter is missing than silently accept the "ghost" cache type? |
Hi @rogyar, I think there are two possible solutions to the problem and it depends on what the leading factor is. If you take the XSD as "source of truth" (or whatever you wanna call it, hahah) it shouldn't throw the exception. If you take the implementation as the leading factor the XSD should be updated and make the "instance" parameter required. I talked a little with @eduard13 in the Magento Community Engineering Slack about why
A lot of assumptions, I know. If |
Hi @Serializator. Thanks very interesting observation and absolutely makes sense for me. Thank you for the detailed description. I believe we need to figure out why the |
Hi @rogyar, any progress in regards to the internal discussion or not yet? Just checking out of curiosity 😉 |
Still in progress. I will get back here as soon as I have green/red light on how to proceed with this one. Thank you |
Hi @Serializator. Thank you for your report.
The fix will be available with the upcoming 2.4.0 release. |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
I'd expect the cache type to be successfully disabled.
According to the XSD ("lib/internal/Magento/Framework/Cache/etc/cache.xsd") the "instance" argument is optional and not required.
Actual result (*)
It throws an exception because it's trying to invoke
->clean(...)
on a null variable.The text was updated successfully, but these errors were encountered: