- Home
- What's New
- Improved Sorting for Magento 2
🎯
Feature Spotlight
Overview
27 releases in the last year
Each square is a week. Pick one to jump to its releases.
Less
More
November 2026
Nov 16
1.5.5
Nov 16
Fixed
-
"Pin on top" with Amasty Elastic Search — pinned products were not moved to the top of category and search listings when Amasty Elastic Search (
amasty_elastic_opensearch) was the search engine. Pinning now works with it as with the native Elasticsearch/OpenSearch engines - Sorting on pages with a product widget — when a page showed a Catalog Products List (or Page Builder Products) widget sorted by a criterion before a search results list, the search results were sorted by the widget's criterion and "Prioritize relevance" was switched off. Each product list is now sorted by its own criterion
-
Formula ranking factor with similar variable names — when one variable's name started with another's (e.g.
{factor_1}and{factor_12}, or{product_price}and{product_price_view}), the formula received wrong values, and if the shorter variable was empty the whole factor reindex failed. Each variable is now replaced as a whole -
GraphQL: pinned products without a sort criterion — a products query with
mst_pinbut nomst_sortfailed with "Unknown column 'ASC'". It now returns pinned products first in the default order -
GraphQL: incomplete
mst_sort— a products query that left out thecodeordirofmst_sort(both optional) failed with an "Undefined array key" error. A missing code now uses the default sorting criterion, and a missing direction uses the criterion's own default -
GraphQL: unknown
mst_sortcode — a code that is neither a sorting criterion nor a standard Magento sort field returned no products. It now falls back to the default criterion, as the category page does -
GraphQL: criterion codes with a hyphen — sorting by a criterion whose code contains a hyphen (e.g.
price-0-9) failed with "Sort order field ... contains restricted symbols". Such criteria now sort correctly
Nov 11
1.5.4
Nov 11
Improved
- Scheduled reindex no longer clears the category page cache — the periodic rebuild of the sorting index used to flush every cached category page once a day, even when nothing you control had changed. Now only your own changes (saving a ranking factor or sorting criterion) clear the category cache on the next full rebuild; otherwise cached pages pick up the new scores as they expire on their own. This removes the daily traffic spike of uncached category pages
Fixed
- Review Count and Rating scores now update when reviews change — with the sorting indexer on "Update by Schedule", approving, rejecting or deleting a review, or a customer voting on it, left the product's Review Count and Rating scores unchanged until the product was saved or the next full reindex ran. The product is now re-scored by the scheduled indexer. Stores that have removed the Magento Review module can still switch the indexer to "Update by Schedule" without a "Table 'review' doesn't exist" error
- Stock-based sorting on Adobe Commerce — when Multi-Source Inventory marked a product as sold out or back in stock, the stock ranking factors re-scored a different product, or none, instead of the one that changed. The right product is now re-scored
- Grid edits and deletes now reach the storefront — editing sorting criteria or ranking factors inline in the admin grids, or deleting them from the grid or the edit page, did not clear the category page cache, so cached category pages kept the old order until they expired. These actions now trigger the same cache refresh as saving the form, and a multi-row inline edit triggers it only once
Nov 9
1.5.3
Nov 9
Improved
- ⚠️ Saving, deleting and inline-editing sorting criteria and ranking factors now only works through a form submission (POST). The Delete buttons in the grids and on the edit pages were updated to match. A custom link or script that triggers these actions with a plain GET request must be changed to send a POST with the admin form key
Fixed
- Sorting criterion direction — the direction saved on a criterion, or sent from the criterion preview, was put into the product sort query without being checked. Only "ascending" and "descending" are accepted now; any other value is ignored, so it can no longer change the storefront or preview query
-
Ranking factor settings — a Formula factor's
{factor_…}variable and a Date factor's date field were inserted into database queries as typed. A Formula variable must now be{factor_<numeric ID>}(anything else is rejected with an "Incorrect variable" error), and a Date factor only reindexes with one of the dates offered in the form (Creation Date, Update Date, New From Date) -
Admin permissions — any admin role could load the criteria grid, the ranking factors grid, their edit forms and the preview listing, even without access to Sorting. These now require the Sorting permission (
Mirasvit_Sorting::sorting), like the module's menu pages - Admin grids — a ranking factor name, or an attribute code that matches no attribute, was shown as raw HTML in the criteria grid summary, and a ranking factor name was shown unescaped in the grid's Delete confirmation. Both are now displayed as plain text
Nov 5
1.5.2
Nov 5
Fixed
- Saving a single product no longer gives it the top Review Count or Popularity score: a partial reindex now scores products against the catalogue maximum
- With the catalog price scope set to Website, the Profit ranking factor now uses each website's own price and cost
- Ranking rules that match on a category now pick up a product being added to or removed from a category without a full reindex
- Products deleted by a CSV import (Delete Entities or Replace) are removed from the sorting index
- The sorting index no longer stops updating after a product is deleted when a formula ranking factor is used
- On the search results page, Relevance now lists the most relevant products first even when the "Default for Search" criterion sorts ascending
- In the classic Fast-Mode autocomplete, a Position "Default for Search" criterion now sorts by each store's own root category
October 2026
Oct 26
1.5.1
Oct 26
Improved
- Compatible with Mirasvit Core 2.0 — the module can now be installed alongside both the 1.x and 2.0 versions of the core package
- Removed two plugins that did nothing — one ran on every product tile in a listing, the other on switching the indexer mode — so they no longer add overhead
-
⚠️ Removed the unused plugin class
Mirasvit\Sorting\Plugin\SwitchMviewStateBeforeSetScheduledPlugin— if a customisation references it indi.xml, remove that reference before upgrading
Fixed
- Sorting by a dropdown attribute now follows option labels — a criterion on a dropdown attribute (e.g. Color or Manufacturer) ordered products by the order the options were created in. Products are now sorted alphabetically by option label, with products without a value last, on category pages, search results and autocomplete Fast Mode. Dropdowns with a custom source (country, tax class) and frames that add several attributes together sort as before. A duplicated option label no longer breaks the listing with "Item with the same ID already exists"
- Autocomplete Fast Mode — sorting by an attribute criterion had no effect on Elasticsearch/OpenSearch, and the "Default for Search" criterion overrode the shopper's own sort choice. Fast Mode now sorts by attribute criteria, respects the shopper's choice, and follows a "Relevance first on search" setting saved at website or store view scope. Saving the Sorting configuration now updates Fast Mode immediately, without a reindex. When no autocomplete default sorting is set, Search Autocomplete keeps its own default
- GraphQL / headless storefronts:
- Stock Qty and Child In Stock factors are now re-scored when a product is saved or updated by the scheduled indexer; before, their scores stayed stale until the next full reindex
- Discount factor — saving a single product gave it (and its configurable parent) the maximum discount score, and re-scored every configurable in the catalogue, some to 0. A partial reindex now scores against the whole catalogue and updates only the affected products
-
Formula factor — a
{product_<code>}variable for a dropdown with a source model (status, visibility, tax class) could resolve to an unrelated option label (e.g. "Male"); store-scoped attribute values in a formula now come from the right store view; a partial reindex no longer recalculates the whole catalogue - Deleted products and ranking factors — a deleted product's sorting index rows were never removed; they are now removed after the delete is committed, so a running reindex can no longer make the product delete time out and roll back. A full reindex (also from the CLI) now drops a deleted ranking factor's index columns unless a criterion still sorts by it, and "Column not found" errors after removing a factor are fixed
- Setup and sample data no longer create a second ranking factor of the same type when the first one has not been indexed yet
- Pinned products — saving a category or product through the repository (API, imports, other extensions) could overwrite pins made elsewhere since the entity was loaded, or drop the pins being saved
- With ElasticSuite, the search results page no longer resets the "Default for Search" criterion's direction to ascending
- The Catalog Products List widget ignored its "Sort by" setting when Magento's Configurable Product module was enabled
- When several criteria are marked as default, the one with the lowest position (then the oldest) is used, and if it is hidden on the category the next visible default is used instead of the system sorting
- Concurrent popularity tracking requests could deadlock and return a 500 error, losing the counted view
- The ranking factor conditions builder did not render on Adobe Commerce with PHP 8.1+
- Admin forms and grids:
- Criteria grid — the "Then" marker for tie-breaker frames was never shown; it now appears (translated) only at the start of each tie-breaker. A ranking factor that is not indexed yet is shown by name instead of its numeric ID. Two attribute pickers on one page no longer show the same attribute list
- Debug card — attribute-based criteria show their real value under "Sort by" instead of 0.000, and a fractional weighted score no longer causes an error
Oct 8
1.5.0
Oct 8
New
Show a sorting criterion only in selected categories
The criterion form has a new "Show in categories" switch: keep the default "All categories", or choose "Selected categories" and tick categories in a tree. A restricted criterion appears in the "Sort by" dropdown only on the ticked category pages (subcategories are not included automatically). The category's own "Available Product Listing Sort By" setting still narrows the list on top; if that leaves nothing, every visible criterion is offered. The default sort order and
?product_list_order links never land on a hidden criterion — the first visible criterion by position is used instead. Search results, autocomplete, Catalog Products widgets, Page Builder product lists and brand pages keep showing every active criterion. The new form labels are translated into all shipped languages
New
GraphQL follows the same category rules
sort_fields returns only the criteria visible on the queried category, and an mst_sort code hidden on that category falls back to the default criterion. When the default criterion (or the category's own default sort) is hidden, the first visible option becomes the default, matching the category page
New
⚠️ **Database changes
New column
mst_sorting_criterion.category_scope and new table mst_sorting_criterion_category; run bin/magento setup:upgrade. Existing criteria default to "All categories", so the storefront is unchanged until you restrict one
Fixed
- Stock-based sorting now updates when MSI changes a product's salability — when Multi-Source Inventory recalculated whether a product is salable (for example after an order or reservation), the Stock, Stock Qty, Backorder and Child In Stock ranking factors kept the old in-stock/out-of-stock score until the next full reindex, so sold-out products could stay on top. Now only the affected products and only the stock-dependent factors are re-scored, and a failure in this step is logged instead of blocking Magento's own stock cache refresh
-
Saving a customer or order no longer fails on Magento 2.4.9 when an old order contains a deleted product — with indexers on "Update by Schedule", Magento 2.4.9 rejected the sorting change-log entry for order items whose product had been deleted, rolling back the whole save (e.g. changing a customer's email) with a "Column 'entity_id' cannot be null" error. The fix also holds when other extensions (such as Adobe Commerce's data exporter) or
setup:upgraderebuild the shared database trigger - Each rule-based ranking factor now scores only its own matches — when several "Rule" ranking factors were reindexed in one run, products matched by an earlier rule were also scored as matches by the following rules, so later rules boosted the wrong products
- Catalog Products widgets sorted by a criterion now respect it on Elasticsuite — on stores using Smile Elasticsuite, a widget with a sorting criterion in its "Sort by" setting showed products in the search engine's default order
- Category selections on a criterion are kept when an Adobe Commerce scheduled update is removed — removing a staging version of a category no longer drops that category from criteria restricted to it. Links are cleaned up only when a category (including a whole subtree) is actually deleted
-
GraphQL
sort_fieldsno longer fails with an error when no default sorting criterion is configured - Limited the PhpSpreadsheet library (used by the Formula ranking factor) to versions below 6.0, so Composer cannot install an untested major or development release that could break the store
September 2026
Sep 18
1.4.18
Sep 18
Improved
- Category pages are no longer flushed from cache on every scheduled reindex — the sorting index rebuild runs on a cron up to four times a day and used to wipe the full-page cache for the entire category tree on each run, even when nothing you control had changed. The cache is now cleared when you actually save a ranking factor or sorting criterion; a purely periodic rebuild refreshes it at most once a day. Category pages stay fast and server load during the day drops noticeably
- The admin reminder shown after saving a sorting criterion or reindexing a ranking factor now says "Elasticsearch/OpenSearch engine is used" instead of naming Elasticsearch only — stores running OpenSearch were being told about an engine they do not use. Updated in all 16 shipped languages
-
⚠️ For developers with custom ranking factors — the store ID is now a required argument when a ranking factor writes its scores to the sorting index. A custom factor that omits it will fail loudly on reindex instead of silently writing scores that only apply at global scope. Pass
0explicitly if the factor's data really is the same for every store view
Fixed
- Sorting now works on stores using the Smile ElasticSuite search engine — the engine was not recognized as Elasticsearch-compatible, which could prevent your criteria and ranking factors from being applied to category, search, and search API (REST/GraphQL) results
-
⚠️ Criterion conditions and ranking factor settings saved in the legacy format are converted automatically — on stores upgraded from very old Magento versions, these settings were stored in an outdated format that could no longer be read, so a criterion could load with no conditions and a ranking factor with no configuration. A one-time migration converts them during
setup:upgrade; rows already in the current format are skipped, so it is safe to run repeatedly - Search Suggest now respects your "Default for Search" criterion — with Search Autocomplete Fast Mode ON, the suggestion dropdown ignored the criterion configured as the default for search and could show old or out-of-stock products first. It now sorts suggestions by your configured default. Stores that have not set a default for search are unaffected
- The "Default for Search" criterion is also applied with Fast Mode OFF — on Elasticsearch/OpenSearch the suggestion dropdown fell back to plain relevance, so the criterion saved without ever taking effect. It is now used as the default order, keeping every step of a multi-step criterion. A criterion that mixes ranking factors with product attributes safely falls back to relevance instead of making the search engine reject the request and return no suggestions at all
- Date-based sorting now works on every store view — the Date ranking factor (created/updated date) wrote its scores only at global scope, leaving individual store views with no score, and it ignored per-store-view "News From Date" overrides. Scores are now written for each active store view, and store-level overrides are honored
- "Is New" sorting now works on every store view — like the Date factor, the Is New ranking factor scored products at global scope only, so a criterion based on it had no visible effect on any real store view. It now honors each product's store-specific "Set Product as New from Date" value
- Products stop being treated as new once "Set Product as New to Date" passes — the end date was never applied, so a product that had been marked new kept receiving the maximum "Is New" score indefinitely and stayed at the top of new-first listings. The newness period now ends on the configured date
- Ranking factor reindex no longer hides real errors — genuine database errors during reindex could be misread as routine lock conflicts and quietly ignored, leaving a ranking factor unscored with nothing in the logs to explain it, and in some cases an unfinished database transaction was left open and produced a confusing secondary error. Lock conflicts are still retried silently as before; every other failure is now reported
Sep 2
1.4.17
Sep 2
Fixed
- Relevance-sorted search results now follow the search engine's relevance score instead of being overridden by other ranking factors
- Fixed product sorting that could show the wrong order on some store views
- Fixed an error that could break product pages and search on stores using certain Elasticsearch integrations
- Sorting debug information is no longer shown on the storefront by default
- Sorting index cleanup no longer stalls on stores with very large catalogs
August 2026
Aug 25
1.4.16
Aug 25
Fixed
- Fixed sorting on stores using the Amasty Elastic OpenSearch search engine — sorting options were not recognized as compatible with this engine, which could prevent them from being applied correctly on category, search, and search API (REST/GraphQL) results
Aug 18
1.4.15
Aug 18
Improved
- Sped up category pages that combine "Pin to Top" with layered navigation by removing redundant, repeated database lookups for pinned products on the same page render
Fixed
- Fixed intermittent 500 errors on storefront and CMS pages during catalog reindex — on MariaDB, any page that touched ranking factors could crash with a database error if it was loaded while a reindex was in progress, because the sorting index's internal columns were being read at the same moment they were being modified. These pages now keep working correctly throughout a reindex.
Aug 13
1.4.14
Aug 13
Fixed
- Preview modal now shows products in their real ranked order — clicking "Preview" on a criterion or ranking factor's edit page compared every product's score as zero instead of its actual computed score, so results always came back in default (unranked) order no matter how the criterion was configured. The preview now scores products correctly and reloads fresh results each time it's opened.
Aug 11
1.4.13
Aug 11
Fixed
- Search results now open on "Relevance" again — when no sorting criterion was set as the default for search, the search results page fell back to an arbitrary active criterion instead of Magento's standard "Relevance" order, so shoppers saw results sorted by something unexpected. Search now defaults to "Relevance" (and shows it in the sorting dropdown), unless you explicitly configure a default criterion for search
- Fixed the Turkish storefront label "Rating: %1%", which printed a literal "%1" instead of the product's rating because of a broken placeholder in the translation file
July 2026
Jul 20
1.4.12
Jul 20
Fixed
- Fixed the Stock Status ranking factor on Adobe Commerce (with Content Staging) so configurable and grouped products are now scored using their children's stock correctly — previously they could rank as if out of stock
- Fixed the Bestseller ranking factor on Adobe Commerce (with Content Staging) so configurable and grouped products' sales are now correctly attributed to the parent product when ranking
- Products with 100+ reviews are no longer all ranked the same — the Review Count factor now scores them relative to the highest review count in the catalog, so the most-reviewed products still rank above others
- Fixed a bug where a ranking factor could no longer be blocked from the admin Configuration section by role permissions — the missing permission resource is now declared, so ACL restrictions work as expected
- Fixed a bug where a "Formula" ranking factor saved without a formula would crash the reindex process, preventing catalog and other pending updates from being processed until manually resolved
Jul 3
1.4.11
Jul 3
Fixed
- Search crawlers no longer inflate sorting statistics — Googlebot and other crawlers that run page JavaScript were being counted like real shoppers, inflating criterion popularity counts and the viewed-products report and adding needless server load. Tracking now records only genuine shopper interactions, and a related issue that fired duplicate tracking requests on every sort change was fixed.
- Popularity counts are no longer lost under heavy traffic — when many shoppers changed sorting at the same time, simultaneous updates could overwrite each other and silently undercount criterion popularity. Counts are now recorded reliably.
- Fixed a fatal error on stores using Smile ElasticSuite — on Magento 2.4.8 and later, ElasticSuite GraphQL/REST product requests (category pages, search, Add to Cart) failed with a "Cannot use object of type SortOrder as array" error. Sorting now works correctly with ElasticSuite.
- Prevented out-of-memory crashes when reindexing large catalogs — the Popularity and Sales-per-View ranking factors read view counts directly from the raw product-views log, which could build huge temporary tables and exhaust MySQL memory on large catalogs. They now read from Magento's pre-aggregated daily views report (falling back to the raw log in safe batches when that report is turned off). The Sales-per-View factor also now counts views per store instead of across all stores.
- "Pin to Top" now takes priority over the Stock Status factor — pinned products were being outranked by the global Stock Status ranking factor; they now appear at the top of the category as intended.
May 2026
May 18
1.4.10
May 18
Fixed
- Fixed an issue where "Pin to Top" product selections on the category edit page were not saved when the Magento Visual Merchandiser module was also enabled
May 12
1.4.9
May 12
Fixed
- Fixed an issue where reindexing could fail with a "Deadlock found when trying to get lock" error on high-traffic stores.
April 2026
Apr 23
1.4.8
Apr 23
Improved
- Localize module to 15 locales (ar_SA, cs_CZ, de_DE, es_ES, fr_FR, it_IT, ja_JP, nl_NL, pl_PL, pt_BR, pt_PT, sv_SE, tr_TR, uk_UA, zh_Hans_CN)
Apr 17
1.4.7
Apr 17
Improved
- When both Mirasvit Sorting and Mirasvit Merchandiser are installed, all active sorting criteria now appear as sorting options inside Merchandiser's products grid.
Apr 10
1.4.6
Apr 10
Fixed
- Fixed compatibility issue with Magento 2.3.* (PHP 7.3)
March 2026
Mar 5
1.4.5
Mar 5
Fixed
- Fixed an error "Undefined array key" in the debug mode
February 2026
Feb 13
1.4.4
Feb 13
Fixed
- Added MSI support for "Number of Child Products in Stock" factor
Feb 5
1.4.3
Feb 5
Fixed
- Search relevance not working in GraphQL requests on Magento 2.4.8+
January 2026
Jan 29
1.4.2
Jan 29
Fixed
- GraphQL request compatibility with Magento 2.4.8+
Jan 13
1.4.1
Jan 13
Fixed
- Compatibility with magento 2.4.1
December 2025
Dec 17
1.4.0
Dec 17
New
Added the ability to pin specified products to the category top
Dec 16
1.3.40
Dec 16
Fixed
- Warning: Undefined variable $options (compatibility with Search Autocomplete Fast Mode)
Dec 4
1.3.39
Dec 4
Fixed
- Console error "Uncaught TypeError: Cannot read properties of undefined (reading value)"
- Added compatibility for PageBuilder product listing sorting with SmileElasticSuite