-
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
TypeError: explode(): Argument #2 ($string) must be of type string, null given in /var/www/php/folder/vendor/magento/module-config/ViewModel/CountryFilter.php:46 #35901
Comments
Hi @pmonosolo. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 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, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-November. Thank you for working on this issue.
|
Running 2.4.5 on PHP 8.1 here and not having this issue. Perhaps some external module is altering this list? |
Hmmm, not sure yet. Just starting to dig into this again. So far I have: Then upgraded composer to v2 and reinstalled everything. Still getting the same error. Found mentions of CountryFilter in two plugins:
Going to try to go around them or deinstall. Will report back. |
Disabling / removing those two plugins did not work. I assume this is a data problem - something broke when initial upgrade script ran (did not finish successfully on first try). Going to try uploading new backup of DB and re-running the upgrade command. |
Could it be related to: #35875 |
After doing this: Then going to General -> Countries -> European Union Countries -> Clicking "Use system value" Then undoing the code back to initial state: The page now shows up correctly: Then when I rerun the MySQL query for same field: It shows 0 results. So it must be that when no EU countries are selected, it created the field with NULL, but then NULL is not accepted by the code. |
I think this was a bug somewhere in 2.4.3, or in the earlier version of Magento 2.3.3 which the site went through that the values were not defaulted when you uncheck them and uncheck "Use system value". Now on 2.4.5 when you uncheck the "Use System Value" it defaults the fields to: If you uncheck all those countries and save again, it puts them back in. UPDATE: When 2.4.5 upgrade happens it expects the value not to be NULL, thats where the issue is coming from. |
Hi @pmonosolo , |
It was fixed in commit 29f0658 |
Hello, As I can see this issue got fixed in the scope of the internal Jira ticket AC-6385 by the internal team Based on the Jira ticket, the target version is 2.4.6. Thanks |
@engcom-Hotel |
Sure @davirs, let us check, we will get back to you. |
@engcom-Hotel Same here after update from 2.4.2 to 2.4.6-p3 |
Here is the solution: |
And 2.4.7 same issue. Its not soo hard to fix it. Magento Dev needs to be more faster to fix that problems. |
Preconditions and environment
Steps to reproduce
Expected result
Configuration page visible
Actual result
Error is thrown:
TypeError: explode(): Argument #2 ($string) must be of type string, null given in /var/www/php/folder/vendor/magento/module-config/ViewModel/CountryFilter.php:46
Stack trace:
#0 /var/www/php/folder/vendor/magento/module-config/ViewModel/CountryFilter.php(46): explode(',', NULL)
#1 /var/www/php/folder/vendor/magento/module-config/view/adminhtml/templates/system/config/js.phtml(81): Magento\Config\ViewModel\CountryFilter->getEuCountryList()
#2 /var/www/php/folder/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/php/mo...')
#3 /var/www/php/folder/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Backend\Block\Template), '/var/www/php/mo...', Array)
#4 /var/www/php/folder/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent('render', Array)
#5 /var/www/php/folder/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Backend\Block\Template), '/var/www/php/mo...', Array)
#6 /var/www/php/folder/generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(23): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins('render', Array, Array)
#7 /var/www/php/folder/vendor/magento/framework/View/Element/Template.php(263): Magento\Framework\View\TemplateEngine\Php\Interceptor->render(Object(Magento\Backend\Block\Template), '/var/www/php/mo...', Array)
#8 /var/www/php/folder/vendor/magento/framework/View/Element/Template.php(293): Magento\Framework\View\Element\Template->fetchView('/var/www/php/mo...')
#9 /var/www/php/folder/vendor/magento/module-backend/Block/Template.php(141): Magento\Framework\View\Element\Template->_toHtml()
#10 /var/www/php/folder/vendor/magento/framework/View/Element/AbstractBlock.php(1095): Magento\Backend\Block\Template->_toHtml()
#11 /var/www/php/folder/vendor/magento/framework/View/Element/AbstractBlock.php(1099): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()
#12 /var/www/php/folder/vendor/magento/framework/View/Element/AbstractBlock.php(660): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#13 /var/www/php/folder/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml()
#14 /var/www/php/folder/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('js.system_confi...')
#15 /var/www/php/folder/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout->renderNonCachedElement('js.system_confi...')
#16 /var/www/php/folder/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('js.system_confi...')
#17 /var/www/php/folder/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('js.system_confi...', false)
#18 /var/www/php/folder/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('js', false)
#19 /var/www/php/folder/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout->renderNonCachedElement('js')
#20 /var/www/php/folder/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('js')
#21 /var/www/php/folder/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('js', false)
#22 /var/www/php/folder/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#23 /var/www/php/folder/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#24 /var/www/php/folder/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#25 /var/www/php/folder/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#26 /var/www/php/folder/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('backend.page', false)
#27 /var/www/php/folder/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout->renderNonCachedElement('backend.page')
#28 /var/www/php/folder/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('backend.page')
#29 /var/www/php/folder/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement('backend.page', false)
#30 /var/www/php/folder/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('root', false)
#31 /var/www/php/folder/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout->renderNonCachedElement('root')
#32 /var/www/php/folder/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#33 /var/www/php/folder/vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout->renderElement('root')
#34 /var/www/php/folder/generated/code/Magento/Framework/View/Layout/Interceptor.php(50): Magento\Framework\View\Layout->getOutput()
#35 /var/www/php/folder/vendor/magento/framework/View/Result/Page.php(260): Magento\Framework\View\Layout\Interceptor->getOutput()
#36 /var/www/php/folder/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#37 /var/www/php/folder/generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(32): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#38 /var/www/php/folder/vendor/magento/framework/App/Http.php(120): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#39 /var/www/php/folder/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#40 /var/www/php/folder/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#41 {main}
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: