v1.0.5: How to fix incompatible issue with M2.4.2 EE?

Created by Jane D, Modified on Thu, 15 Jul, 2021 at 11:46 AM by Jane D

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!  





Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article