-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: SearchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
Preconditions
- Magento 2.1.1
- Using Ubuntu/trusty64 vagrant-box, php7, apache
Steps to reproduce
- Add a new custom module
- Update etc/di.xml in your custom module
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<preference for="Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection" type="Sanimarkt\App\Model\ResourceModel\Fulltext\Collection" />
</config>
- Add new Collection.php file and override _renderFiltersBefore() method
<?php
namespace Sanimarkt\App\Model\ResourceModel\Fulltext;
/**
* Fulltext Collection
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Collection extends \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection
{
protected function _renderFiltersBefore()
{
die('stopping here');
}
}
- clear cache
- Make a search request
Expected result
- The search request should stop and show 'stopping here' on the screen
Actual result
- Nothing happens the custom class Sanimarkt\App\Model\ResourceModel\Fulltext\Collection.php is not executed.
Metadata
Metadata
Assignees
Labels
Component: SearchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report