Closed
Description
Preconditions (*)
- Magento 2.3.3 CE
Steps to reproduce (*)
- Create a cache type using "cache.xml" without the "instance" argument
<config .../>
<type name="exceptional_cache_type">
<label>Exceptional Cache Type</label>
<description>An exceptional cache type using a quantum computer</description>
</type>
</config>
- Go to "System > Cache Management" in the backend
- Check the checkbox of the cache type "Exceptional Cache Type"
- Select "Disable" and click "Submit"
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.
Fatal error: Uncaught Error: Call to a member function clean() on null in /lib/internal/Magento/Framework/App/Cache/TypeList.php:194 Stack trace:
#0 /app/code/Magento/Backend/Controller/Adminhtml/Cache/MassDisable.php(62): Magento\Framework\App\Cache\TypeList->cleanType('invalid_cache_t...')
#1 /app/code/Magento/Backend/Controller/Adminhtml/Cache/MassDisable.php(41): Magento\Backend\Controller\Adminhtml\Cache\MassDisable->disableCache()
#2 /generated/code/Magento/Backend/Controller/Adminhtml/Cache/MassDisable/Interceptor.php(24): Magento\Backend\Controller\Adminhtml\Cache\MassDisable->execute()
#3 /lib/internal/Magento/Framework/App/Action/Action.php(107): Magento\Backend\Controller\Adminhtml\Cache\MassDisable\Interceptor->execute()