Closed mattqiu closed 3 years ago
Hello @mattqiu,
In your description of the issue you mention that you have ElasticSuite Version :7.14
it's not correct, I guess it's related to the version of the Elasticsearch, you could get info about the version of ElasticSuite with this command:
$ composer info | grep elasticsuite
.
Have you got any error messages during saving of the Display settings?
Have you tried to make clean/flush your cache and full reindex?
BR, Vadym
smile/elasticsuite 2.9.7 Magento 2 merchandising and search engine built on ElasticSearch
@mattqiu, I've tried to reproduce your issue according to your preconditions. So I use fresh Magento CE 2.3.5-p1 with sample data and ElasticSuite 2.9.7.
Unfortunately, I was not able to reproduce this one, everything works as expected. Probably your Magento instance has some specific data, attributes, or settings.
You should check if everything is reindexed, clear your cache, also please check Magento logs or enable debug mode for ElasticSuite in Magento BO.
BR, Vadym
I checked,it wasn't save data in table smile_elasticsuitecatalog_category_filterable_attribute when I edit in category page,how can I fix it?
didn't call the save data function,how can I check?
please tell me,where is the place to config the call function when I click save button?
hello ?
@mattqiu, when you try to save the category by pressing on the Save button and if during this action somethings are wrong you should see an error message on a Category page, also you could check errors in the Console tab of your browser or check Magento logs.
Have you noticed any error messages?
Also, could you tell how many attributes do you have in Layered Navigations Filters? It could be linked to some limitations.
As for
where is the place to config the call function when I click save button?
You could start debugging from here: magento_root/vendor/magento/module-catalog/Controller/Adminhtml/Category/Save.php line:141
BR, Vadym
I found the issue,we overwrite
> <preference for="Magento\Catalog\Model\Category" type="Mbb\Url\Model\Category" />
this.How can I change it.in Mbb\Url\Model\Category,I just overwrite the getUrl() function,if I remove this function also can't save.but remove
> <preference for="Magento\Catalog\Model\Category" type="Mbb\Url\Model\Category" />
,It works fine.how can I change it?
@mattqiu, could you tell me where you find out this piece of code:
> <preference for="Magento\Catalog\Model\Category" type="Mbb\Url\Model\Category" />
?
BR, Vadym
this code was from my module,
@mattqiu, if I understood you correctly, the cause of your problem was the wrong code in your custom module.
Since we do not know what exactly your module does and why you needed to overwrite the getUrl() function, you will have to solve this conflict yourself or make a choice between your module and ElasticSuite.
You could try to remove our module and check again if you be able to save the Display Settings and Category.
In any case, your problem does not relate to our module, since I tried to reproduce your problem and I failed, which means that normally everything works as expected.
BR, Vadym
`<?php namespace Mbb\Url\Model;
class Category extends \Magento\Catalog\Model\Category {
public function getUrl($parent = false)
{
if($parent) return parent::getUrl();
$baseUrl = $this->_storeManager->getStore()->getBaseUrl();
return $baseUrl.$this->replaceSpace($this->getName())."/c-" . $this->getId();
}
public function replaceSpace($string)
{
return strtolower(preg_replace('/\s+/',"-",$string));
}
} `
this is the file content.can you help me check it?
Hi,
could you try replacing <preference for="Magento\Catalog\Model\Category" type="Mbb\Url\Model\Category" />
by <preference for="Magento\Catalog\Api\Data\CategoryInterface" type="Mbb\Url\Model\Category" />
?
And also try to add the "implements Magento\Catalog\Api\Data\CategoryInterface" in your class ?
ok.save action saved correct now.but I found in result page. didn't have content in filter menu,can you tell me what the problem here? thank you
hello?
Hello @mattqiu
since we do not reproduce your issue, this is likely to be project-specific, and therefore out of scope of our Open Source support policy provided here.
In addition to that, you did not provide any debug as asked by @vahonc (log files, ...), so this makes us really blind to help in debugging here. Please give us more details if you want some help, and not just a picture.
And finally, dont abusively bump topics, this is an Open source repository, we are not your employees here. To be honest, until you provide more details about how to reproduce, this is issue is considered as low-priority by our side.
Regards
I didn't abusively bump topics,this is about the extension.I notice that you overwrite \Magento\Swatches\Block\LayeredNavigation\RenderLayered in \vendor\smile\elasticsuite\src\module-elasticsuite-swatches\Block\Navigation\Renderer\Swatches\RenderLayered.php,but it didn't run this file.why?
@mattqiu, from your last screenshot I guess that you are using some custom theme? Have you tried to switch on the default Luma theme? To be honest, from this cut screenshot it's hard to understand what you wanted and what you expected to see.
And, please don't ignore our advice and requests for more details, if you have any problems with your website first of all you should check logs.
I told you that we can't reproduce your issue, which means that generally everything is worked as expected. And most likely the reasons that caused your issue is somewhere in the specific configurations of your website. Earlier I suggested you check the configuration of attributes, maybe some of them are custom and not very properly configured. Also, you mention that you have some custom module that caused some conflicts with saving category data, have you tried to disable this module? And finally, you could remove our module and check again if your issue is still relevant.
BR, Vadym
Just a quick addition to what Vadym said :
initial topic is not reproductible : it might be due to the fact that it's project specific, or due to the fact that you did not provide the asked details (please refer to our previous posts to know what to provide).
you have an issue with layered navigation : it's another topic, open a new issue for this one please, and don't pollute this one. We need to stick with "one bug = one issue" otherwise we are not able to do maintainance easily.
Regards
This issue was waiting update from the author for too long. Without any update, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away! Thanks for your contribution.
cant' save Layered Navigation Filters in backend
Preconditions
PHP 7.3.28,centos,Magento ver. 2.3.5-p1
Magento Version : Magento ver. 2.3.5-p1
ElasticSuite Version :7.14
Environment :Developer
Third party modules : Smile_ElasticsuiteAdminNotification Smile_ElasticsuiteCore Smile_ElasticsuiteCatalog Smile_ElasticsuiteCatalogGraphQl Smile_ElasticsuiteCatalogRule Smile_ElasticsuiteCatalogOptimizer Smile_ElasticsuiteTracker Smile_ElasticsuiteThesaurus Smile_ElasticsuiteSwatches Smile_ElasticsuiteIndices
Steps to reproduce
1. 2. 3.
Expected result
1.
Actual result