QUESTION:
I use the module for my site Magento 2.4.2EE, when I select/unselect FAQ category > Save --> showing error:
Warning: Invalid argument supplied for foreach in .... app/code/Bss/Faqs/Model/Faqs.php line 153
Please tell us how to fix?
ANSWER:
To fix this error, please follow our guide:
In the file app/code/Bss/Faqs/Block/Adminhtml/Grid/Assign/Table/Product.php, please remove line 88 and add this code below:
if ($this->magentoVersion->getEdition() === 'Enterprise' || $this->magentoVersion->getEdition() === 'B2B') {
In the file app/code/Bss/Faqs/Model/Faqs.php, remove line 135 and add the 5 lines code below:
$getStoreIds = $this->getStoreId();
if (!is_array($this->getStoreId())) {
$getStoreIds[] = $this->getStoreId();
}
foreach ($getStoreIds as $storeId) {
Or download the files attached below to override the current files on your site.
If you need any further assistance, please feel free to contact us. We'd be happy to support!
Why choosing BSS Commerce?
BSS Commerce is a full-service ecommerce agency with 14+ years of experience, supporting 75,000+ customers worldwide. As an Adobe Commerce Solution Bronze Partner and Select Magento Extensions Builder, we deliver trusted end-to-end solutions.
Our core strength is Magento, with 150+ extensions designed to enhance store performance and drive growth. With deep expertise from years of working on Magento websites, we deliver scalable, high-impact solutions backed by strong client trust.
Discover our extensions: https://bsscommerce.com/magento-2-extensions.html
Our top-tier extensions:
- BSS Commerce’s Magento 2 B2B Extension enhances B2B performance with streamlined workflows and tailored pricing strategies.
- BSS Commerce’s Magento 2 SEO Extension improves rankings and maximizes organic growth through advanced SEO automation.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article