mnaczenski / MNExtendSearch

7 stars 3 forks source link

SW 6.1.5 - Error during dal:refresh:index -> #2

Open macidev opened 4 years ago

macidev commented 4 years ago

Hi,

during dal:refresh:index I got the following message:

Argument 1 passed to Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria::__construct() must be of the type array, null given, called in /home/XXXX/XXXX/production/custom/plugins/MNExtendSearch-master/src/Service/MySearchKeywordAnalyser.php on line 118

The only setting active is "search in description" Hosting: Profihost PHP-Version: 7.3 Sales-Channel Name is with german umlauts Setting was set for "all sales channels"

After changing this to the only relevant with overriding the "global" setting, everything worked fine.

mnaczenski commented 4 years ago

Thank you for reporting this issue, I will check it tomorrow and give you some feedback.

mnaczenski commented 4 years ago

I was not able to reproduce your issue. As far as I understood, you only changed the value for the specific sales-channel (setting for description). In my case it worked fine without exception. The line indicates that something with the properties went wrong, did you activate the properties as well?

macidev commented 4 years ago

Hi, as far as i can remember, I installed the plugin, changed the corresponding settings (without touching the salechannel setting). The changed settings were: description search (Beschreibung durchsuchen), properties search and then I set some settings active regarding the boosting config. But after I got the error I deactivated everthing and changed only the saleschannel with description search.

macidev commented 3 years ago

Hi, issue still persists. After activate the "search for PROPERTIES" and setting the weight to 250 and ran "php bin/console dal:refresh:index" I geht above mentioned error. Currently installed Shopware Version is 6.3.5.1

derBoogie commented 2 years ago

The core changed. Function analyze in /custom/plugins/MNExtendSearch/src/Service/MySearchKeywordAnalyser.php needs 3 params:

public function analyze(ProductEntity $product, Context $context, array $configFields): AnalyzedKeywordCollection
{
  $keywords = $this->coreAnalyzer->analyze($product, $context, $configFields);
...