Configuring products' manual sortorder inside a category does work in frontend.
Linux, Apache, MariaDB
Magento Version : 2.2.4 (CE)
ElasticSuite Version : 2.5 (composer says ^2.5 and no newer updates available) Otherwise I can't tell the version.
Environment : developer
Third party modules :
I see the desired sort orders are being saved to the table smile_virtualcategory_catalog_category_product_position. However they are NOT saved to the table catalog_category_product, I am not sure that this would be necessary though.
Could you please use composer info | grep smile to see the exact version of elasticsuite ?
This bug is looking like this one : https://github.com/Smile-SA/elasticsuite/pull/936
And it has been fixed in latest Elasticsuite version (2.5.11)
Let us know,
Regards
That command returns "2.5.11"
I had seen that bug and checked the files for those changes (they are there).
I am not able to reproduce your issue on elasticsuite 2.5.11 and Magento 2.2.4
Are you sure that :
Regards
As @romainruaud explained we are not able to reproduce the issue.
Can you be more specific on detail that may allow us to reproduce it.
Sorry, I had to deinstall that module now. It may be possible that some other module was interfering with the functionality but I currently don't have the time to dig deeper. I might get back to you later.
As we were not able to reproduce and you can't give us more detail I close this one.
I suspect a third party module to cause the bug.
We are always sad to see people that can't use our module. So if you want to give it a try later and can provide us more detail, feel free to reopen this issue.
BR,
Hey @romainruaud @afoucret
I didn't want to open a new ticket because I suspect ours might be 3rd party module related also. But we have this exact behaviour, saving a category with manual sort, the updated order doesn't show up in the FE until you manually reindex via CLI.
We have most of the indexes set to Update on schedule, and the cron is definitely running. Can you just confirm that in this case, the changes should appear automatically in the FE after saving a category? We've tried waiting a couple of minutes then cleared the cache, still the updated sort order doesn't show
ES 2.5.12
Rob
Some additional info:
• LEMP
• Production mode
• M2.2.3
• Varnish (setup to purge when flushing M cache)
• Redis sessions
I have the exact same issue and I think I know what the problem is.
This is an issue when running index in "Update on Scheduled", when you save a category you get this:
bin/magento indexer:status
| Title | Status | Update On | Schedule Status | Schedule Updated |
|-----------------------------------------|--------|-----------|---------------------|---------------------|
| Catalog Product Rule | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:19 |
| Catalog Rule Product | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:18 |
| Catalog Search | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:18 |
| Category Flat Data | Ready | Schedule | idle (1 in backlog) | 2018-09-07 10:07:18 |
| Category Products | Ready | Schedule | idle (1 in backlog) | 2018-09-07 10:07:18 |
| Customer Grid | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:17 |
| Design Config Grid | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:17 |
| ElasticSuite Category Indexing | Ready | Schedule | idle (1 in backlog) | 2018-09-07 10:07:24 |
| ElasticSuite Thesaurus Indexing | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:24 |
| Product Categories | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:18 |
| Product EAV | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:18 |
| Product Flat Data | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:17 |
| Product Price | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:19 |
| Product/Target Rule | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:20 |
| Sales Rule | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:18 |
| Stock | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:18 |
| Target Rule/Product | Ready | Schedule | idle (0 in backlog) | 2018-09-07 10:07:20 |
As you can see in the "Schedule Status" column, it creates 3 entries in the backlog for these index types:
But the issue is that it does not create an entry for "Catalog Search" which seems to need to be reindex for the manual order to work.
When I switch the "Catalog Search" index to "Update on Save", it does work properly.
Oh well, thank you @nicobatty for digging more on this one. Always a pleasure to receive such detailed feedbacks.
You may be right on the fact that saving custom products position is not adding the affected products into the changelog queue when index is set to "Update on Schedule".
Are you able to propose a PR for this one ?
Hey @romainruaud
May i ask what your recommended approach would be on fixing this?
probably missing a registration for mview on the smile_virtualcategory_catalog_category_product_position table
Like https://github.com/Smile-SA/elasticsuite/blob/master/src/module-elasticsuite-catalog/etc/mview.xml
Hi @romainruaud,
I figured out how to fix it. I will make a PR in a minute.
@smuzza @OvalMedia @robjstanley
Can you guys can confirm that my PR #1064 does fix the issue?
You have to reindex catalogsearch_fulltext first though because it only updates the product that had their position changed and not the entire manual sort products (which is a good thing).
@romainruaud Arg I did not look at your message talking about the mview!
I looked at the core Magento code for a while before figuring this one out by myself lol.
@nicobatty
Tested the fix on multiple environments and works great.
@romainruaud I've submitted a PR #1076 with the suggested update to the virtual-category module instead. I could do with this being added to the module as soon as possible as it will save me patching a few sites 👍
Associated PR have been merged and will be part of the next minor release scheduled for next week.
Thank you for reporting it.
Regards