Не работает &sort=`ms|price:desc`?

Появилась необходимость использовать сортировку по дефолту от большего к меньшему по цене. Использовал &sort=`ms|price:desc` но вывод товаров на странице стал = 0


Вызов спиппета:
[[!mFilter2?
	&parents=`[[*id]]`	
	&filters=`[[!getImageList? &docid=`[[*id]]` &tvname=`optionFilterCat` &tpl=`tpl.output.filter`]],ms|price:number,ms|vendor:vendors,ms|made_in:select`
	&suggestionsRadio=`[[!getImageList? &docid=`[[*id]]` &tvname=`optionFilterCat` &tpl=`tpl.output.filter.suggest`]]`
	&suggestions=`true`
	&suggestionsMaxFilters=`500`
	&element=`msProducts`
	&class=`msProduct`
	&tpls=`itemCategoryTpl, itemCategoryLineTpl`
	&includeTVs=`typeproduct`
    &includeThumbs=`120x120,260x260,360x360`
	&limit=`24`
	&sort=`ms|price:asc`
.... и шаблоны
]]
В лог MODX пишет:
[2017-02-16 16:35:05] (ERROR @ /var/www/********/data/www/******.ru/core/components/pdotools/model/pdotools/pdofetch.class.php : 170) [pdoTools] Error 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 24' at line 1
&showLog
0.0000181: xPDO query object created
0.0002680: Included list of tvs: 
0.0001090: leftJoined msProductData as Data
0.0000598: leftJoined msVendor as Vendor
0.0000548: leftJoined msProductFile as 120x120
0.0000529: leftJoined msProductFile as 260x260
0.0000541: leftJoined msProductFile as 360x360
0.0000069: Grouped by msProduct.id
0.0000949: Added selection of msProduct: SQL_CALC_FOUND_ROWS `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
0.0000360: Added selection of msProductData: `article`, `price`, `old_price`, `weight`, `image`, `thumb`, `vendor`, `made_in`, `new`, `popular`, `favorite`, `tags`, `color`, `size`, `source`
0.0000348: Added selection of msVendor: `name` AS `vendor.name`, `resource` AS `vendor.resource`, `country` AS `vendor.country`, `logo` AS `vendor.logo`, `address` AS `vendor.address`, `phone` AS `vendor.phone`, `fax` AS `vendor.fax`, `email` AS `vendor.email`, `description` AS `vendor.description`, `properties` AS `vendor.properties`
0.0000260: Added selection of msProductFile: `url` as `120x120`
0.0000222: Added selection of msProductFile: `url` as `260x260`
0.0000241: Added selection of msProductFile: `url` as `360x360`
0.0000448: Processed additional conditions
0.0001512: Added where condition: class_key=msProduct, msProduct.id:IN(1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1064,1065,1066,1067,2075,2085,2102,2103,2104,2108,2128,2129,2130,2131,2135,2138,2141,2142,2145,2148,2149,2164,2165,2168,2171,2173,2175,2177,2364,2365,2366,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401), msProduct.published=1, msProduct.deleted=0
0.0000269: Sorted by `Data`.`price` desc, 
0.0000029: Limited to 24, offset 0
0.0002301: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `msProduct`.`id`, `msProduct`.`type`, `msProduct`.`contentType`, `msProduct`.`pagetitle`, `msProduct`.`longtitle`, `msProduct`.`description`, `msProduct`.`alias`, `msProduct`.`link_attributes`, `msProduct`.`published`, `msProduct`.`pub_date`, `msProduct`.`unpub_date`, `msProduct`.`parent`, `msProduct`.`isfolder`, `msProduct`.`introtext`, `msProduct`.`richtext`, `msProduct`.`template`, `msProduct`.`menuindex`, `msProduct`.`searchable`, `msProduct`.`cacheable`, `msProduct`.`createdby`, `msProduct`.`createdon`, `msProduct`.`editedby`, `msProduct`.`editedon`, `msProduct`.`deleted`, `msProduct`.`deletedon`, `msProduct`.`deletedby`, `msProduct`.`publishedon`, `msProduct`.`publishedby`, `msProduct`.`menutitle`, `msProduct`.`donthit`, `msProduct`.`privateweb`, `msProduct`.`privatemgr`, `msProduct`.`content_dispo`, `msProduct`.`hidemenu`, `msProduct`.`class_key`, `msProduct`.`context_key`, `msProduct`.`content_type`, `msProduct`.`uri`, `msProduct`.`uri_override`, `msProduct`.`hide_children_in_tree`, `msProduct`.`show_in_tree`, `msProduct`.`properties`, `Data`.`article`, `Data`.`price`, `Data`.`old_price`, `Data`.`weight`, `Data`.`image`, `Data`.`thumb`, `Data`.`vendor`, `Data`.`made_in`, `Data`.`new`, `Data`.`popular`, `Data`.`favorite`, `Data`.`tags`, `Data`.`color`, `Data`.`size`, `Data`.`source`, `Vendor`.`name` AS `vendor.name`, `Vendor`.`resource` AS `vendor.resource`, `Vendor`.`country` AS `vendor.country`, `Vendor`.`logo` AS `vendor.logo`, `Vendor`.`address` AS `vendor.address`, `Vendor`.`phone` AS `vendor.phone`, `Vendor`.`fax` AS `vendor.fax`, `Vendor`.`email` AS `vendor.email`, `Vendor`.`description` AS `vendor.description`, `Vendor`.`properties` AS `vendor.properties`, `120x120`.`url` as `120x120`, `260x260`.`url` as `260x260`, `360x360`.`url` as `360x360` FROM `16CGn_site_content` AS `msProduct` LEFT JOIN `16CGn_ms2_products` `Data` ON `msProduct`.`id`=`Data`.`id` LEFT JOIN `16CGn_ms2_vendors` `Vendor` ON `Data`.`vendor`=`Vendor`.`id` LEFT JOIN `16CGn_ms2_product_files` `120x120` ON `120x120`.`product_id` = `msProduct`.`id` AND `120x120`.`parent` != 0 AND `120x120`.`path` LIKE '%/120x120/' LEFT JOIN `16CGn_ms2_product_files` `260x260` ON `260x260`.`product_id` = `msProduct`.`id` AND `260x260`.`parent` != 0 AND `260x260`.`path` LIKE '%/260x260/' LEFT JOIN `16CGn_ms2_product_files` `360x360` ON `360x360`.`product_id` = `msProduct`.`id` AND `360x360`.`parent` != 0 AND `360x360`.`path` LIKE '%/360x360/' WHERE  ( `msProduct`.`class_key` = 'msProduct' AND `msProduct`.`id` IN (1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1064,1065,1066,1067,2075,2085,2102,2103,2104,2108,2128,2129,2130,2131,2135,2138,2141,2142,2145,2148,2149,2164,2165,2168,2171,2173,2175,2177,2364,2365,2366,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401) AND `msProduct`.`published` = 1 AND `msProduct`.`deleted` = 0 )  GROUP BY msProduct.id ORDER BY `Data`.`price` desc ASC LIMIT 24 "
0.0010180: Could not process query, error #1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 24' at line 1
0.0026050: Total time
4 194 304: Memory usage
0.0000889: pdoTools loaded.
0.0122371: Fetched ids for building filters: "1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1064,1065,1066,1067,2075,2085,2102,2103,2104,2108,2128,2129,2130,2131,2135,2138,2141,2142,2145,2148,2149,2164,2165,2168,2171,2173,2175,2177,2364,2365,2366,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401" from element "msProducts"
0.0000060: Total number of results: 92
0.0000041: Getting filters for ids: "1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1064,1065,1066,1067,2075,2085,2102,2103,2104,2108,2128,2129,2130,2131,2135,2138,2141,2142,2145,2148,2149,2164,2165,2168,2171,2173,2175,2177,2364,2365,2366,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401"
0.0018029: Total number of filters: 10
0.0126359: Fired paginator: "pdoPage"
0.0000050: Filters retrieved
0.0005531: Loaded chunk "tpl.mFilter2.filter.number"
0.0005598: Loaded chunk "tpl.mFilter2.filter.slider"
0.0006151: Loaded chunk "tpl.mFilter2.filter.option"
0.0006759: Loaded chunk "tpl.mFilter2.filter.select"
0.0002830: Filters templated
0.0000050: Total filter operations: 0
0.0296140: Total time
4 194 304: Memory usage
Виктор
16 февраля 2017, 14:00
modx.pro
1 696
0

Комментарии: 4

DocentBF
16 февраля 2017, 21:00
0
Добавьте &showLog=`1` и покажите вывод
    Виктор
    17 февраля 2017, 08:09
    0
    Обновил тикет, добавил showLog
      DocentBF
      17 февраля 2017, 09:23
      0
      Попробуйте добавить &sortdir=``
        Виктор
        17 февраля 2017, 09:33
        0
        Попробовал для &sort= 'ms|price:desc','ms|price','price' при установленном &sortdir=`DESC` товары выводятся но не сортируются.
    Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
    4