Closed
Description
Preconditions (*)
- dev-2.4-develop
Steps to reproduce (*)
- Create a custom module, plugin, or Observer
- Inject a concrete instance of \Magento\Framework\ObjectManagerInterface ($this->_objectManager) through the constructor
- Execute the following:
$sourceModelObj = $this->_objectManager->create('\Magento\Config\Model\Config\Source\Email\Template');
$optionsArray = $sourceModelObj->toOptionArray();
- Notice unhandled exception is written to the screen
Expected result (*)
- Should not throw an error
- Should return default collection options
Actual result (*)
Exception #0 (UnexpectedValueException): Email template '' is not defined.
<pre>#1 Magento\Email\Model\Template\Config->getTemplateLabel('') called at [vendor/magento/module-config/Model/Config/Source/Email/Template.php:64]
#2 Magento\Config\Model\Config\Source\Email\Template->toOptionArray() called at [app/code/Magesmith/ScopeExplorer/Block/Scopes.php:172]
#3 Magesmith\ScopeExplorer\Block\Scopes->getSourceModelValue('catalog_producta...') called at [app/code/Magesmith/ScopeExplorer/Block/Scopes.php:135]
#4 Magesmith\ScopeExplorer\Block\Scopes->getWebsiteScopeValue(&Magento\Store\Model\Website\Interceptor#00000000476d138d000000000886eb4d#) called at [app/code/Magesmith/ScopeExplorer/Block/Scopes.php:97]
#5 Magesmith\ScopeExplorer\Block\Scopes->hasScopeValue() called at [app/code/Magesmith/ScopeExplorer/view/adminhtml/templates/scopes.phtml:7]
#6 include('/mnt/f/www/local...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#7 Magento\Framework\View\TemplateEngine\Php->render(&Magesmith\ScopeExplorer\Block\Scopes#00000000476d1f2e000000000886eb4d#, '/mnt/f/www/local...', array('csp' => &Magento\Csp\Helper\InlineUtil#00000000476d1d31000000000886eb4d#)) called at [vendor/magento/framework/Interception/Interceptor.php:58]
Please provide Severity assessment for the Issue as 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.
- [x ] 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”.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.
Type
Projects
Status
Done