When using the pagination quickly it sometimes happens that the end-user is getting an error.
This can be reproduced when quickly clicking through the pagination as soon as it is possible and the chances are increased on a slower network connection.
Also having a 'heavier' category page in general will increase the probability to get this error which is the case for our client (all configurable products with swatches and custom functionality).
Note that we also have the pagination at the top of the product grid visible which also makes it 'easier' to quickly navigate to different pages without having to scroll down to the toolbar below the products first.
Environment
PHP Version: 7.4
Magento Version: 2.4.3
Tweakwise Version: 4.1.0
Tweakwise Export Version: 4.0.1
Magento Deploy Mode: production (also tested on developer mode)
Steps to reproduce
Enable 'slow 3g' network throttling in Chrome Developer Tools (or similar in browser of choice)
When looking into the var/report you will (probably) find:
{"0":"No ajax navigation result handler found for ","1":"#1 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#2 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#3 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->___callPlugins() called at [generated\/code\/Emico\/Tweakwise\/Controller\/Ajax\/Navigation\/Interceptor.php:23]\n#4 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->execute() called at [vendor\/magento\/framework\/App\/Action\/Action.php:111]\n#5 Magento\\Framework\\App\\Action\\Action->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#6 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#7 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#8 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->___callPlugins() called at [generated\/code\/Emico\/Tweakwise\/Controller\/Ajax\/Navigation\/Interceptor.php:32]\n#9 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/FrontController.php:245]\n#10 Magento\\Framework\\App\\FrontController->getActionResponse() called at [vendor\/magento\/framework\/App\/FrontController.php:212]\n#11 Magento\\Framework\\App\\FrontController->processRequest() called at [vendor\/magento\/framework\/App\/FrontController.php:147]\n#12 Magento\\Framework\\App\\FrontController->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#13 Magento\\Framework\\App\\FrontController\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#14 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-store\/App\/FrontController\/Plugin\/RequestPreprocessor.php:99]\n#15 Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#16 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-page-cache\/Model\/App\/FrontController\/BuiltinPlugin.php:71]\n#17 Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#18 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#19 Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php:23]\n#20 Magento\\Framework\\App\\FrontController\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/Http.php:116]\n#21 Magento\\Framework\\App\\Http->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:264]\n#22 Magento\\Framework\\App\\Bootstrap->run() called at [pub\/index.php:29]\n","url":"\/tweakwise\/ajax\/navigation\/?p=16","script_name":"\/index.php","report_id":"e4285f0c891dba815fbf81b8a582d1a50b4a8f0941b2217c70009fd901b51213"}
Expected result
The pagination should not never break, even though when not all the tweakwise js is fully loaded
Issue Brief
When using the pagination quickly it sometimes happens that the end-user is getting an error. This can be reproduced when quickly clicking through the pagination as soon as it is possible and the chances are increased on a slower network connection.
Also having a 'heavier' category page in general will increase the probability to get this error which is the case for our client (all configurable products with swatches and custom functionality). Note that we also have the pagination at the top of the product grid visible which also makes it 'easier' to quickly navigate to different pages without having to scroll down to the toolbar below the products first.
Environment
Steps to reproduce
Actual result
{"0":"No ajax navigation result handler found for ","1":"#1 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#2 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#3 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->___callPlugins() called at [generated\/code\/Emico\/Tweakwise\/Controller\/Ajax\/Navigation\/Interceptor.php:23]\n#4 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->execute() called at [vendor\/magento\/framework\/App\/Action\/Action.php:111]\n#5 Magento\\Framework\\App\\Action\\Action->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#6 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#7 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#8 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->___callPlugins() called at [generated\/code\/Emico\/Tweakwise\/Controller\/Ajax\/Navigation\/Interceptor.php:32]\n#9 Emico\\Tweakwise\\Controller\\Ajax\\Navigation\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/FrontController.php:245]\n#10 Magento\\Framework\\App\\FrontController->getActionResponse() called at [vendor\/magento\/framework\/App\/FrontController.php:212]\n#11 Magento\\Framework\\App\\FrontController->processRequest() called at [vendor\/magento\/framework\/App\/FrontController.php:147]\n#12 Magento\\Framework\\App\\FrontController->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#13 Magento\\Framework\\App\\FrontController\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#14 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-store\/App\/FrontController\/Plugin\/RequestPreprocessor.php:99]\n#15 Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#16 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-page-cache\/Model\/App\/FrontController\/BuiltinPlugin.php:71]\n#17 Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#18 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#19 Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php:23]\n#20 Magento\\Framework\\App\\FrontController\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/Http.php:116]\n#21 Magento\\Framework\\App\\Http->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:264]\n#22 Magento\\Framework\\App\\Bootstrap->run() called at [pub\/index.php:29]\n","url":"\/tweakwise\/ajax\/navigation\/?p=16","script_name":"\/index.php","report_id":"e4285f0c891dba815fbf81b8a582d1a50b4a8f0941b2217c70009fd901b51213"}
Expected result