问题说明:
点开用户信息提示 Call to a member function getId() on null
解决方法
查看var/log/system.log日志文件
main.CRITICAL: Error: Call to a member function getId() on null in vendor/magento/module-customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Renderer/Action.php:63
确定出错位置,发现是$this->_coreRegistry->registry('subscriber')为空导致getId()出错,修改代码加入空值判断。
$this->_coreRegistry->registry('subscriber')?$this->_coreRegistry->registry('subscriber')->getId() : null
最后
以上就是可靠烤鸡最近收集整理的关于magento2.4 用户信息提示 Call to a member function getId() on null的全部内容,更多相关magento2.4内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复