Amasty ShopbySeo 2.13.1 breaking routing in significant ways in 2.4.4

Amasty ShopbySeo 2.13.1 breaking routing in significant ways in 2.4.4

Amasty ShopbySeo's Router \Amasty\ShopbySeo\Controller\Router is breaking my site's routing in significant ways.

For example, we have a URL /consultation/questions/index/condition/2/ which is a custom route, consultation_questions_index in a custom module. 

From testing, the Shopby Router first extracts the last part, /2/ and notices that we have an attribute called UVA Rating which has option values of 1, 2, 3, 4, 5.

Your router then looks to see if 2 is a potential route



Because it is able to "match" 2 to the UVA rating attribute, it assumes it's one of the ShopBy pages and then sets the $request's pathInfo to /consultation/questions/index/condition/ stripping the 2 and setting the params it finds.

However, because the core M2 frontend base router \Magento\Framework\App\Router\Base NEEDS to see the /condition/2/ in that pathInfo to set the param ['condition' => 2], it's broken routing on several of our modules, breaking dozens of pages.  This includes category pages in FishPig WordPress, for example. 

This has cost us thousands in revenue. We have lost patients who were unable to complete their consultations. We've resolved this temporarily by adding additional routes to $skipRequestIdentifiers in \Amasty\ShopbySeo\Helper\Data 

Debug backtrace included below. 


  1. [{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/amasty\/shopby-seo\/Controller\/Router.php","line":160,"function":"setPathInfo","class":"Magento\\Framework\\App\\Request\\Http","object":{},"type":"->","args":["\/consultation\/questions\/index\/condition"]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":58,"function":"modifyRequest","class":"Amasty\\ShopbySeo\\Controller\\Router","object":{},"type":"->","args":[{},"\/consultation\/questions\/index\/condition",{"pack_size_select":"2970"}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":138,"function":"___callParent","class":"Amasty\\ShopbySeo\\Controller\\Router\\Interceptor","object":{},"type":"->","args":["modifyRequest",[{},"\/consultation\/questions\/index\/condition",{"pack_size_select":"2970"}]]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/amasty\/module-shop-by-brand\/Plugin\/ShopbySeo\/Controller\/Router.php","line":44,"function":"Magento\\Framework\\Interception\\{closure}","class":"Amasty\\ShopbySeo\\Controller\\Router\\Interceptor","object":{},"type":"->","args":[{},"\/consultation\/questions\/index\/condition",{"pack_size_select":"2970"}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":135,"function":"aroundModifyRequest","class":"Amasty\\ShopbyBrand\\Plugin\\ShopbySeo\\Controller\\Router","object":{},"type":"->","args":[{},{},{},"\/consultation\/questions\/index\/condition",{"pack_size_select":"2970"}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":153,"function":"Magento\\Framework\\Interception\\{closure}","class":"Amasty\\ShopbySeo\\Controller\\Router\\Interceptor","object":{},"type":"->","args":[{},"\/consultation\/questions\/index\/condition",{"pack_size_select":"2970"}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/generated\/code\/Amasty\/ShopbySeo\/Controller\/Router\/Interceptor.php","line":23,"function":"___callPlugins","class":"Amasty\\ShopbySeo\\Controller\\Router\\Interceptor","object":{},"type":"->","args":["modifyRequest",[{},"\/consultation\/questions\/index\/condition",{"pack_size_select":"2970"}],null]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/amasty\/shopby-seo\/Controller\/Router.php","line":77,"function":"modifyRequest","class":"Amasty\\ShopbySeo\\Controller\\Router\\Interceptor","object":{},"type":"->","args":[{},"\/consultation\/questions\/index\/condition",{"pack_size_select":"2970"}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/App\/FrontController.php","line":144,"function":"match","class":"Amasty\\ShopbySeo\\Controller\\Router","object":{},"type":"->","args":[{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":58,"function":"dispatch","class":"Magento\\Framework\\App\\FrontController","object":{},"type":"->","args":[{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":138,"function":"___callParent","class":"Magento\\Framework\\App\\FrontController\\Interceptor","object":{},"type":"->","args":["dispatch",[{}]]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/module-store\/App\/FrontController\/Plugin\/RequestPreprocessor.php","line":99,"function":"Magento\\Framework\\Interception\\{closure}","class":"Magento\\Framework\\App\\FrontController\\Interceptor","object":{},"type":"->","args":[{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":135,"function":"aroundDispatch","class":"Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor","object":{},"type":"->","args":[{},{},{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/module-page-cache\/Model\/App\/FrontController\/BuiltinPlugin.php","line":71,"function":"Magento\\Framework\\Interception\\{closure}","class":"Magento\\Framework\\App\\FrontController\\Interceptor","object":{},"type":"->","args":[{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":58,"function":"aroundDispatch","class":"Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin","object":{},"type":"->","args":[{},{},{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":138,"function":"___callParent","class":"Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin\\Interceptor","object":{},"type":"->","args":["aroundDispatch",[{},{},{}]]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":153,"function":"Magento\\Framework\\Interception\\{closure}","class":"Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin\\Interceptor","object":{},"type":"->","args":[{},{},{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/generated\/code\/Magento\/PageCache\/Model\/App\/FrontController\/BuiltinPlugin\/Interceptor.php","line":23,"function":"___callPlugins","class":"Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin\\Interceptor","object":{},"type":"->","args":["aroundDispatch",[{},{},{}],{"4":["amasty_fpc_holepunch_block_generator"]}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":135,"function":"aroundDispatch","class":"Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin\\Interceptor","object":{},"type":"->","args":[{},{},{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/Interception\/Interceptor.php","line":153,"function":"Magento\\Framework\\Interception\\{closure}","class":"Magento\\Framework\\App\\FrontController\\Interceptor","object":{},"type":"->","args":[{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php","line":23,"function":"___callPlugins","class":"Magento\\Framework\\App\\FrontController\\Interceptor","object":{},"type":"->","args":["dispatch",[{}],null]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/App\/Http.php","line":116,"function":"dispatch","class":"Magento\\Framework\\App\\FrontController\\Interceptor","object":{},"type":"->","args":[{}]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/vendor\/magento\/framework\/App\/Bootstrap.php","line":264,"function":"launch","class":"Magento\\Framework\\App\\Http","object":{},"type":"->","args":[]},{"file":"\/home\/cloudpanel\/htdocs\/www.oursite.com\/releases\/2022_07_28_5_00_32_branch_master_v2.4.4\/pub\/index.php","line":30,"function":"run","class":"Magento\\Framework\\App\\Bootstrap","object":{},"type":"->","args":[{}]}]