Attempting To Override Pager - Type Error
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
Right now, I'm simply attempting to override the Pager class. Without changing anything within it, I've copied it into my module, and then specified the preference in the di:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
</config>
Problem is, after doing so, I run into a Type Error when creating an Item class:
1 exception(s):
Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: MagentoCatalogModelLayerFilterItem
Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: MagentoCatalogModelLayerFilterItem
<pre>#1 MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create('MagentoCatalog...', array()) called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#2 MagentoFrameworkObjectManagerObjectManager->create('MagentoCatalog...', array()) called at [generated/code/Magento/Catalog/Model/Layer/Filter/ItemFactory.php:43]
#3 MagentoCatalogModelLayerFilterItemFactory->create() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:236]
#4 MagentoCatalogModelLayerFilterAbstractFilter->_createItem('Cut-Off Wheels', 1045, 15) called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:205]
#5 MagentoCatalogModelLayerFilterAbstractFilter->_initItems() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:159]
#6 MagentoCatalogModelLayerFilterAbstractFilter->getItems() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:148]
#7 MagentoCatalogModelLayerFilterAbstractFilter->getItemsCount() called at [vendor/magento/module-catalog/Model/Layer/Category/AvailabilityFlag.php:33]
#8 MagentoCatalogModelLayerCategoryAvailabilityFlag->canShowOptions(array(&MagentoCatalogSearchModelLayerFilterCategory#0000000062560a0700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560e2500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561cb500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561d4000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256144100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterPrice#0000000062561cc900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256065f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c1e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c2800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b7b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0600000000508c807a#)) called at [vendor/magento/module-catalog/Model/Layer/Category/AvailabilityFlag.php:23]
#9 MagentoCatalogModelLayerCategoryAvailabilityFlag->isEnabled(&MagentoCatalogModelLayerCategoryInterceptor#000000006256039000000000508c807a#, array(&MagentoCatalogSearchModelLayerFilterCategory#0000000062560a0700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560e2500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561cb500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561d4000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256144100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterPrice#0000000062561cc900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256065f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c1e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c2800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b7b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0600000000508c807a#)) called at [vendor/magento/module-layered-navigation/Block/Navigation.php:110]
#10 MagentoLayeredNavigationBlockNavigation->canShowBlock() called at [vendor/magento/module-layered-navigation/view/frontend/templates/layer/view.phtml:18]
#11 include('/vagrant/vendor/...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#12 MagentoFrameworkViewTemplateEnginePhp->render(&MagentoLayeredNavigationBlockNavigation#00000000625619d000000000508c807a#, '/vagrant/vendor/...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#13 MagentoFrameworkViewElementTemplate->fetchView('/vagrant/vendor/...') called at [vendor/magento/framework/View/Element/Template.php:301]
#14 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:668]
#15 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#16 MagentoFrameworkViewLayout->_renderBlock('catalog.leftnav') called at [vendor/magento/framework/View/Layout.php:533]
#17 MagentoFrameworkViewLayout->renderNonCachedElement('catalog.leftnav') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#18 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('catalog.leftnav') called at [vendor/magento/framework/View/Layout.php:488]
#19 MagentoFrameworkViewLayout->renderElement('catalog.leftnav', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#20 MagentoFrameworkViewLayoutInterceptor->renderElement('catalog.leftnav', false) called at [vendor/magento/framework/View/Layout.php:585]
#21 MagentoFrameworkViewLayout->_renderContainer('sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:535]
#22 MagentoFrameworkViewLayout->renderNonCachedElement('sidebar.main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#23 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('sidebar.main') called at [vendor/magento/framework/View/Layout.php:488]
#24 MagentoFrameworkViewLayout->renderElement('sidebar.main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#25 MagentoFrameworkViewLayoutInterceptor->renderElement('sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:585]
#26 MagentoFrameworkViewLayout->_renderContainer('div.sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:535]
#27 MagentoFrameworkViewLayout->renderNonCachedElement('div.sidebar.main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#28 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('div.sidebar.main') called at [vendor/magento/framework/View/Layout.php:488]
#29 MagentoFrameworkViewLayout->renderElement('div.sidebar.main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#30 MagentoFrameworkViewLayoutInterceptor->renderElement('div.sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:585]
#31 MagentoFrameworkViewLayout->_renderContainer('columns', false) called at [vendor/magento/framework/View/Layout.php:535]
#32 MagentoFrameworkViewLayout->renderNonCachedElement('columns') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#33 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('columns') called at [vendor/magento/framework/View/Layout.php:488]
#34 MagentoFrameworkViewLayout->renderElement('columns', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#35 MagentoFrameworkViewLayoutInterceptor->renderElement('columns', false) called at [vendor/magento/framework/View/Layout.php:585]
#36 MagentoFrameworkViewLayout->_renderContainer('main.content', false) called at [vendor/magento/framework/View/Layout.php:535]
#37 MagentoFrameworkViewLayout->renderNonCachedElement('main.content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#38 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('main.content') called at [vendor/magento/framework/View/Layout.php:488]
#39 MagentoFrameworkViewLayout->renderElement('main.content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#40 MagentoFrameworkViewLayoutInterceptor->renderElement('main.content', false) called at [vendor/magento/framework/View/Layout.php:585]
#41 MagentoFrameworkViewLayout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:535]
#42 MagentoFrameworkViewLayout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#43 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:488]
#44 MagentoFrameworkViewLayout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#45 MagentoFrameworkViewLayoutInterceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:585]
#46 MagentoFrameworkViewLayout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:535]
#47 MagentoFrameworkViewLayout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#48 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:488]
#49 MagentoFrameworkViewLayout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#50 MagentoFrameworkViewLayoutInterceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:954]
#51 MagentoFrameworkViewLayout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#52 MagentoFrameworkViewLayoutInterceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#53 MagentoFrameworkViewLayoutInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#54 MagentoFrameworkViewLayoutInterceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494]
#55 MagentoFrameworkViewLayoutInterceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#56 MagentoFrameworkViewResultPage->render(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#57 MagentoFrameworkViewResultLayout->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#58 MagentoFrameworkViewResultPageInterceptor->___callParent('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#59 MagentoFrameworkViewResultPageInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#60 MagentoFrameworkViewResultPageInterceptor->___callPlugins('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#61 MagentoFrameworkViewResultPageInterceptor->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/App/Http.php:140]
#62 MagentoFrameworkAppHttp->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#63 MagentoFrameworkAppHttpInterceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#64 MagentoFrameworkAppBootstrap->run(&MagentoFrameworkAppHttpInterceptor#0000000062560a9c00000000508c807a#) called at [pub/index.php:40]
</pre>
Any ideas as to what is going on here?
Alright, I think I'm beginning to understand a little. Item is injecting MagentoThemeBlockHtmlPager, and throwing an error as my class doesn't match, even though I'm overriding it with the di preference. Any way around this?
magento2 blocks
New contributor
add a comment |
Right now, I'm simply attempting to override the Pager class. Without changing anything within it, I've copied it into my module, and then specified the preference in the di:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
</config>
Problem is, after doing so, I run into a Type Error when creating an Item class:
1 exception(s):
Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: MagentoCatalogModelLayerFilterItem
Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: MagentoCatalogModelLayerFilterItem
<pre>#1 MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create('MagentoCatalog...', array()) called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#2 MagentoFrameworkObjectManagerObjectManager->create('MagentoCatalog...', array()) called at [generated/code/Magento/Catalog/Model/Layer/Filter/ItemFactory.php:43]
#3 MagentoCatalogModelLayerFilterItemFactory->create() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:236]
#4 MagentoCatalogModelLayerFilterAbstractFilter->_createItem('Cut-Off Wheels', 1045, 15) called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:205]
#5 MagentoCatalogModelLayerFilterAbstractFilter->_initItems() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:159]
#6 MagentoCatalogModelLayerFilterAbstractFilter->getItems() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:148]
#7 MagentoCatalogModelLayerFilterAbstractFilter->getItemsCount() called at [vendor/magento/module-catalog/Model/Layer/Category/AvailabilityFlag.php:33]
#8 MagentoCatalogModelLayerCategoryAvailabilityFlag->canShowOptions(array(&MagentoCatalogSearchModelLayerFilterCategory#0000000062560a0700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560e2500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561cb500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561d4000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256144100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterPrice#0000000062561cc900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256065f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c1e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c2800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b7b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0600000000508c807a#)) called at [vendor/magento/module-catalog/Model/Layer/Category/AvailabilityFlag.php:23]
#9 MagentoCatalogModelLayerCategoryAvailabilityFlag->isEnabled(&MagentoCatalogModelLayerCategoryInterceptor#000000006256039000000000508c807a#, array(&MagentoCatalogSearchModelLayerFilterCategory#0000000062560a0700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560e2500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561cb500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561d4000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256144100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterPrice#0000000062561cc900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256065f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c1e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c2800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b7b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0600000000508c807a#)) called at [vendor/magento/module-layered-navigation/Block/Navigation.php:110]
#10 MagentoLayeredNavigationBlockNavigation->canShowBlock() called at [vendor/magento/module-layered-navigation/view/frontend/templates/layer/view.phtml:18]
#11 include('/vagrant/vendor/...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#12 MagentoFrameworkViewTemplateEnginePhp->render(&MagentoLayeredNavigationBlockNavigation#00000000625619d000000000508c807a#, '/vagrant/vendor/...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#13 MagentoFrameworkViewElementTemplate->fetchView('/vagrant/vendor/...') called at [vendor/magento/framework/View/Element/Template.php:301]
#14 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:668]
#15 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#16 MagentoFrameworkViewLayout->_renderBlock('catalog.leftnav') called at [vendor/magento/framework/View/Layout.php:533]
#17 MagentoFrameworkViewLayout->renderNonCachedElement('catalog.leftnav') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#18 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('catalog.leftnav') called at [vendor/magento/framework/View/Layout.php:488]
#19 MagentoFrameworkViewLayout->renderElement('catalog.leftnav', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#20 MagentoFrameworkViewLayoutInterceptor->renderElement('catalog.leftnav', false) called at [vendor/magento/framework/View/Layout.php:585]
#21 MagentoFrameworkViewLayout->_renderContainer('sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:535]
#22 MagentoFrameworkViewLayout->renderNonCachedElement('sidebar.main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#23 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('sidebar.main') called at [vendor/magento/framework/View/Layout.php:488]
#24 MagentoFrameworkViewLayout->renderElement('sidebar.main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#25 MagentoFrameworkViewLayoutInterceptor->renderElement('sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:585]
#26 MagentoFrameworkViewLayout->_renderContainer('div.sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:535]
#27 MagentoFrameworkViewLayout->renderNonCachedElement('div.sidebar.main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#28 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('div.sidebar.main') called at [vendor/magento/framework/View/Layout.php:488]
#29 MagentoFrameworkViewLayout->renderElement('div.sidebar.main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#30 MagentoFrameworkViewLayoutInterceptor->renderElement('div.sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:585]
#31 MagentoFrameworkViewLayout->_renderContainer('columns', false) called at [vendor/magento/framework/View/Layout.php:535]
#32 MagentoFrameworkViewLayout->renderNonCachedElement('columns') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#33 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('columns') called at [vendor/magento/framework/View/Layout.php:488]
#34 MagentoFrameworkViewLayout->renderElement('columns', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#35 MagentoFrameworkViewLayoutInterceptor->renderElement('columns', false) called at [vendor/magento/framework/View/Layout.php:585]
#36 MagentoFrameworkViewLayout->_renderContainer('main.content', false) called at [vendor/magento/framework/View/Layout.php:535]
#37 MagentoFrameworkViewLayout->renderNonCachedElement('main.content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#38 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('main.content') called at [vendor/magento/framework/View/Layout.php:488]
#39 MagentoFrameworkViewLayout->renderElement('main.content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#40 MagentoFrameworkViewLayoutInterceptor->renderElement('main.content', false) called at [vendor/magento/framework/View/Layout.php:585]
#41 MagentoFrameworkViewLayout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:535]
#42 MagentoFrameworkViewLayout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#43 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:488]
#44 MagentoFrameworkViewLayout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#45 MagentoFrameworkViewLayoutInterceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:585]
#46 MagentoFrameworkViewLayout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:535]
#47 MagentoFrameworkViewLayout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#48 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:488]
#49 MagentoFrameworkViewLayout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#50 MagentoFrameworkViewLayoutInterceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:954]
#51 MagentoFrameworkViewLayout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#52 MagentoFrameworkViewLayoutInterceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#53 MagentoFrameworkViewLayoutInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#54 MagentoFrameworkViewLayoutInterceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494]
#55 MagentoFrameworkViewLayoutInterceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#56 MagentoFrameworkViewResultPage->render(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#57 MagentoFrameworkViewResultLayout->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#58 MagentoFrameworkViewResultPageInterceptor->___callParent('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#59 MagentoFrameworkViewResultPageInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#60 MagentoFrameworkViewResultPageInterceptor->___callPlugins('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#61 MagentoFrameworkViewResultPageInterceptor->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/App/Http.php:140]
#62 MagentoFrameworkAppHttp->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#63 MagentoFrameworkAppHttpInterceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#64 MagentoFrameworkAppBootstrap->run(&MagentoFrameworkAppHttpInterceptor#0000000062560a9c00000000508c807a#) called at [pub/index.php:40]
</pre>
Any ideas as to what is going on here?
Alright, I think I'm beginning to understand a little. Item is injecting MagentoThemeBlockHtmlPager, and throwing an error as my class doesn't match, even though I'm overriding it with the di preference. Any way around this?
magento2 blocks
New contributor
try to run setup upgrade , static content deploy , clear chache and then check
– Rk Rathod
yesterday
add a comment |
Right now, I'm simply attempting to override the Pager class. Without changing anything within it, I've copied it into my module, and then specified the preference in the di:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
</config>
Problem is, after doing so, I run into a Type Error when creating an Item class:
1 exception(s):
Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: MagentoCatalogModelLayerFilterItem
Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: MagentoCatalogModelLayerFilterItem
<pre>#1 MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create('MagentoCatalog...', array()) called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#2 MagentoFrameworkObjectManagerObjectManager->create('MagentoCatalog...', array()) called at [generated/code/Magento/Catalog/Model/Layer/Filter/ItemFactory.php:43]
#3 MagentoCatalogModelLayerFilterItemFactory->create() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:236]
#4 MagentoCatalogModelLayerFilterAbstractFilter->_createItem('Cut-Off Wheels', 1045, 15) called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:205]
#5 MagentoCatalogModelLayerFilterAbstractFilter->_initItems() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:159]
#6 MagentoCatalogModelLayerFilterAbstractFilter->getItems() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:148]
#7 MagentoCatalogModelLayerFilterAbstractFilter->getItemsCount() called at [vendor/magento/module-catalog/Model/Layer/Category/AvailabilityFlag.php:33]
#8 MagentoCatalogModelLayerCategoryAvailabilityFlag->canShowOptions(array(&MagentoCatalogSearchModelLayerFilterCategory#0000000062560a0700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560e2500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561cb500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561d4000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256144100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterPrice#0000000062561cc900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256065f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c1e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c2800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b7b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0600000000508c807a#)) called at [vendor/magento/module-catalog/Model/Layer/Category/AvailabilityFlag.php:23]
#9 MagentoCatalogModelLayerCategoryAvailabilityFlag->isEnabled(&MagentoCatalogModelLayerCategoryInterceptor#000000006256039000000000508c807a#, array(&MagentoCatalogSearchModelLayerFilterCategory#0000000062560a0700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560e2500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561cb500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561d4000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256144100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterPrice#0000000062561cc900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256065f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c1e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c2800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b7b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0600000000508c807a#)) called at [vendor/magento/module-layered-navigation/Block/Navigation.php:110]
#10 MagentoLayeredNavigationBlockNavigation->canShowBlock() called at [vendor/magento/module-layered-navigation/view/frontend/templates/layer/view.phtml:18]
#11 include('/vagrant/vendor/...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#12 MagentoFrameworkViewTemplateEnginePhp->render(&MagentoLayeredNavigationBlockNavigation#00000000625619d000000000508c807a#, '/vagrant/vendor/...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#13 MagentoFrameworkViewElementTemplate->fetchView('/vagrant/vendor/...') called at [vendor/magento/framework/View/Element/Template.php:301]
#14 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:668]
#15 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#16 MagentoFrameworkViewLayout->_renderBlock('catalog.leftnav') called at [vendor/magento/framework/View/Layout.php:533]
#17 MagentoFrameworkViewLayout->renderNonCachedElement('catalog.leftnav') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#18 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('catalog.leftnav') called at [vendor/magento/framework/View/Layout.php:488]
#19 MagentoFrameworkViewLayout->renderElement('catalog.leftnav', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#20 MagentoFrameworkViewLayoutInterceptor->renderElement('catalog.leftnav', false) called at [vendor/magento/framework/View/Layout.php:585]
#21 MagentoFrameworkViewLayout->_renderContainer('sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:535]
#22 MagentoFrameworkViewLayout->renderNonCachedElement('sidebar.main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#23 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('sidebar.main') called at [vendor/magento/framework/View/Layout.php:488]
#24 MagentoFrameworkViewLayout->renderElement('sidebar.main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#25 MagentoFrameworkViewLayoutInterceptor->renderElement('sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:585]
#26 MagentoFrameworkViewLayout->_renderContainer('div.sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:535]
#27 MagentoFrameworkViewLayout->renderNonCachedElement('div.sidebar.main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#28 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('div.sidebar.main') called at [vendor/magento/framework/View/Layout.php:488]
#29 MagentoFrameworkViewLayout->renderElement('div.sidebar.main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#30 MagentoFrameworkViewLayoutInterceptor->renderElement('div.sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:585]
#31 MagentoFrameworkViewLayout->_renderContainer('columns', false) called at [vendor/magento/framework/View/Layout.php:535]
#32 MagentoFrameworkViewLayout->renderNonCachedElement('columns') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#33 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('columns') called at [vendor/magento/framework/View/Layout.php:488]
#34 MagentoFrameworkViewLayout->renderElement('columns', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#35 MagentoFrameworkViewLayoutInterceptor->renderElement('columns', false) called at [vendor/magento/framework/View/Layout.php:585]
#36 MagentoFrameworkViewLayout->_renderContainer('main.content', false) called at [vendor/magento/framework/View/Layout.php:535]
#37 MagentoFrameworkViewLayout->renderNonCachedElement('main.content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#38 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('main.content') called at [vendor/magento/framework/View/Layout.php:488]
#39 MagentoFrameworkViewLayout->renderElement('main.content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#40 MagentoFrameworkViewLayoutInterceptor->renderElement('main.content', false) called at [vendor/magento/framework/View/Layout.php:585]
#41 MagentoFrameworkViewLayout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:535]
#42 MagentoFrameworkViewLayout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#43 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:488]
#44 MagentoFrameworkViewLayout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#45 MagentoFrameworkViewLayoutInterceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:585]
#46 MagentoFrameworkViewLayout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:535]
#47 MagentoFrameworkViewLayout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#48 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:488]
#49 MagentoFrameworkViewLayout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#50 MagentoFrameworkViewLayoutInterceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:954]
#51 MagentoFrameworkViewLayout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#52 MagentoFrameworkViewLayoutInterceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#53 MagentoFrameworkViewLayoutInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#54 MagentoFrameworkViewLayoutInterceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494]
#55 MagentoFrameworkViewLayoutInterceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#56 MagentoFrameworkViewResultPage->render(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#57 MagentoFrameworkViewResultLayout->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#58 MagentoFrameworkViewResultPageInterceptor->___callParent('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#59 MagentoFrameworkViewResultPageInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#60 MagentoFrameworkViewResultPageInterceptor->___callPlugins('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#61 MagentoFrameworkViewResultPageInterceptor->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/App/Http.php:140]
#62 MagentoFrameworkAppHttp->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#63 MagentoFrameworkAppHttpInterceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#64 MagentoFrameworkAppBootstrap->run(&MagentoFrameworkAppHttpInterceptor#0000000062560a9c00000000508c807a#) called at [pub/index.php:40]
</pre>
Any ideas as to what is going on here?
Alright, I think I'm beginning to understand a little. Item is injecting MagentoThemeBlockHtmlPager, and throwing an error as my class doesn't match, even though I'm overriding it with the di preference. Any way around this?
magento2 blocks
New contributor
Right now, I'm simply attempting to override the Pager class. Without changing anything within it, I've copied it into my module, and then specified the preference in the di:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
</config>
Problem is, after doing so, I run into a Type Error when creating an Item class:
1 exception(s):
Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: MagentoCatalogModelLayerFilterItem
Exception #0 (MagentoFrameworkExceptionRuntimeException): Type Error occurred when creating object: MagentoCatalogModelLayerFilterItem
<pre>#1 MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create('MagentoCatalog...', array()) called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#2 MagentoFrameworkObjectManagerObjectManager->create('MagentoCatalog...', array()) called at [generated/code/Magento/Catalog/Model/Layer/Filter/ItemFactory.php:43]
#3 MagentoCatalogModelLayerFilterItemFactory->create() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:236]
#4 MagentoCatalogModelLayerFilterAbstractFilter->_createItem('Cut-Off Wheels', 1045, 15) called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:205]
#5 MagentoCatalogModelLayerFilterAbstractFilter->_initItems() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:159]
#6 MagentoCatalogModelLayerFilterAbstractFilter->getItems() called at [vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php:148]
#7 MagentoCatalogModelLayerFilterAbstractFilter->getItemsCount() called at [vendor/magento/module-catalog/Model/Layer/Category/AvailabilityFlag.php:33]
#8 MagentoCatalogModelLayerCategoryAvailabilityFlag->canShowOptions(array(&MagentoCatalogSearchModelLayerFilterCategory#0000000062560a0700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560e2500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561cb500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561d4000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256144100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterPrice#0000000062561cc900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256065f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c1e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c2800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b7b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0600000000508c807a#)) called at [vendor/magento/module-catalog/Model/Layer/Category/AvailabilityFlag.php:23]
#9 MagentoCatalogModelLayerCategoryAvailabilityFlag->isEnabled(&MagentoCatalogModelLayerCategoryInterceptor#000000006256039000000000508c807a#, array(&MagentoCatalogSearchModelLayerFilterCategory#0000000062560a0700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560e2500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561cb500000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561d4000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256144100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145000000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256145e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterPrice#0000000062561cc900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9700000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256065f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c3f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c9b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c1e00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062561c2800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073200000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256073100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069900000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256069d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#000000006256070f00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0800000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1100000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b1400000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0d00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b7b00000000508c807a#, &MagentoCatalogSearchModelLayerFilterAttribute#0000000062560b0600000000508c807a#)) called at [vendor/magento/module-layered-navigation/Block/Navigation.php:110]
#10 MagentoLayeredNavigationBlockNavigation->canShowBlock() called at [vendor/magento/module-layered-navigation/view/frontend/templates/layer/view.phtml:18]
#11 include('/vagrant/vendor/...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#12 MagentoFrameworkViewTemplateEnginePhp->render(&MagentoLayeredNavigationBlockNavigation#00000000625619d000000000508c807a#, '/vagrant/vendor/...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#13 MagentoFrameworkViewElementTemplate->fetchView('/vagrant/vendor/...') called at [vendor/magento/framework/View/Element/Template.php:301]
#14 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:668]
#15 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#16 MagentoFrameworkViewLayout->_renderBlock('catalog.leftnav') called at [vendor/magento/framework/View/Layout.php:533]
#17 MagentoFrameworkViewLayout->renderNonCachedElement('catalog.leftnav') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#18 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('catalog.leftnav') called at [vendor/magento/framework/View/Layout.php:488]
#19 MagentoFrameworkViewLayout->renderElement('catalog.leftnav', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#20 MagentoFrameworkViewLayoutInterceptor->renderElement('catalog.leftnav', false) called at [vendor/magento/framework/View/Layout.php:585]
#21 MagentoFrameworkViewLayout->_renderContainer('sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:535]
#22 MagentoFrameworkViewLayout->renderNonCachedElement('sidebar.main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#23 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('sidebar.main') called at [vendor/magento/framework/View/Layout.php:488]
#24 MagentoFrameworkViewLayout->renderElement('sidebar.main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#25 MagentoFrameworkViewLayoutInterceptor->renderElement('sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:585]
#26 MagentoFrameworkViewLayout->_renderContainer('div.sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:535]
#27 MagentoFrameworkViewLayout->renderNonCachedElement('div.sidebar.main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#28 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('div.sidebar.main') called at [vendor/magento/framework/View/Layout.php:488]
#29 MagentoFrameworkViewLayout->renderElement('div.sidebar.main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#30 MagentoFrameworkViewLayoutInterceptor->renderElement('div.sidebar.main', false) called at [vendor/magento/framework/View/Layout.php:585]
#31 MagentoFrameworkViewLayout->_renderContainer('columns', false) called at [vendor/magento/framework/View/Layout.php:535]
#32 MagentoFrameworkViewLayout->renderNonCachedElement('columns') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#33 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('columns') called at [vendor/magento/framework/View/Layout.php:488]
#34 MagentoFrameworkViewLayout->renderElement('columns', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#35 MagentoFrameworkViewLayoutInterceptor->renderElement('columns', false) called at [vendor/magento/framework/View/Layout.php:585]
#36 MagentoFrameworkViewLayout->_renderContainer('main.content', false) called at [vendor/magento/framework/View/Layout.php:535]
#37 MagentoFrameworkViewLayout->renderNonCachedElement('main.content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#38 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('main.content') called at [vendor/magento/framework/View/Layout.php:488]
#39 MagentoFrameworkViewLayout->renderElement('main.content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#40 MagentoFrameworkViewLayoutInterceptor->renderElement('main.content', false) called at [vendor/magento/framework/View/Layout.php:585]
#41 MagentoFrameworkViewLayout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:535]
#42 MagentoFrameworkViewLayout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#43 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:488]
#44 MagentoFrameworkViewLayout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#45 MagentoFrameworkViewLayoutInterceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:585]
#46 MagentoFrameworkViewLayout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:535]
#47 MagentoFrameworkViewLayout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#48 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:488]
#49 MagentoFrameworkViewLayout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#50 MagentoFrameworkViewLayoutInterceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:954]
#51 MagentoFrameworkViewLayout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#52 MagentoFrameworkViewLayoutInterceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#53 MagentoFrameworkViewLayoutInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#54 MagentoFrameworkViewLayoutInterceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494]
#55 MagentoFrameworkViewLayoutInterceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#56 MagentoFrameworkViewResultPage->render(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#57 MagentoFrameworkViewResultLayout->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#58 MagentoFrameworkViewResultPageInterceptor->___callParent('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#59 MagentoFrameworkViewResultPageInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#60 MagentoFrameworkViewResultPageInterceptor->___callPlugins('renderResult', array(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#61 MagentoFrameworkViewResultPageInterceptor->renderResult(&MagentoFrameworkAppResponseHttpInterceptor#0000000062560b7100000000508c807a#) called at [vendor/magento/framework/App/Http.php:140]
#62 MagentoFrameworkAppHttp->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#63 MagentoFrameworkAppHttpInterceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#64 MagentoFrameworkAppBootstrap->run(&MagentoFrameworkAppHttpInterceptor#0000000062560a9c00000000508c807a#) called at [pub/index.php:40]
</pre>
Any ideas as to what is going on here?
Alright, I think I'm beginning to understand a little. Item is injecting MagentoThemeBlockHtmlPager, and throwing an error as my class doesn't match, even though I'm overriding it with the di preference. Any way around this?
magento2 blocks
magento2 blocks
New contributor
New contributor
edited yesterday
Dakota Trotter
New contributor
asked yesterday
Dakota TrotterDakota Trotter
112
112
New contributor
New contributor
try to run setup upgrade , static content deploy , clear chache and then check
– Rk Rathod
yesterday
add a comment |
try to run setup upgrade , static content deploy , clear chache and then check
– Rk Rathod
yesterday
try to run setup upgrade , static content deploy , clear chache and then check
– Rk Rathod
yesterday
try to run setup upgrade , static content deploy , clear chache and then check
– Rk Rathod
yesterday
add a comment |
2 Answers
2
active
oldest
votes
In order to get past the Type Error, I had to change my Pager to extend the base Pager class as opposed to the base Template class as the original did.
New contributor
add a comment |
In di.xml use,
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
In MyVendorCoreBlockHtmlPager
use,
namespace MyVendorCoreBlockHtml;
Extend the class by using,
class Pager extends MagentoThemeBlockHtmlPager
{
public function MyCustomFunction()
{
return "working";
}
}
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Dakota Trotter is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269601%2fattempting-to-override-pager-type-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
In order to get past the Type Error, I had to change my Pager to extend the base Pager class as opposed to the base Template class as the original did.
New contributor
add a comment |
In order to get past the Type Error, I had to change my Pager to extend the base Pager class as opposed to the base Template class as the original did.
New contributor
add a comment |
In order to get past the Type Error, I had to change my Pager to extend the base Pager class as opposed to the base Template class as the original did.
New contributor
In order to get past the Type Error, I had to change my Pager to extend the base Pager class as opposed to the base Template class as the original did.
New contributor
New contributor
answered yesterday
Dakota TrotterDakota Trotter
112
112
New contributor
New contributor
add a comment |
add a comment |
In di.xml use,
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
In MyVendorCoreBlockHtmlPager
use,
namespace MyVendorCoreBlockHtml;
Extend the class by using,
class Pager extends MagentoThemeBlockHtmlPager
{
public function MyCustomFunction()
{
return "working";
}
}
New contributor
add a comment |
In di.xml use,
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
In MyVendorCoreBlockHtmlPager
use,
namespace MyVendorCoreBlockHtml;
Extend the class by using,
class Pager extends MagentoThemeBlockHtmlPager
{
public function MyCustomFunction()
{
return "working";
}
}
New contributor
add a comment |
In di.xml use,
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
In MyVendorCoreBlockHtmlPager
use,
namespace MyVendorCoreBlockHtml;
Extend the class by using,
class Pager extends MagentoThemeBlockHtmlPager
{
public function MyCustomFunction()
{
return "working";
}
}
New contributor
In di.xml use,
<preference for="MagentoThemeBlockHtmlPager" type="MyVendorCoreBlockHtmlPager"/>
In MyVendorCoreBlockHtmlPager
use,
namespace MyVendorCoreBlockHtml;
Extend the class by using,
class Pager extends MagentoThemeBlockHtmlPager
{
public function MyCustomFunction()
{
return "working";
}
}
New contributor
edited 19 hours ago
magefms
2,6352528
2,6352528
New contributor
answered 19 hours ago
Hassaan AlviHassaan Alvi
113
113
New contributor
New contributor
add a comment |
add a comment |
Dakota Trotter is a new contributor. Be nice, and check out our Code of Conduct.
Dakota Trotter is a new contributor. Be nice, and check out our Code of Conduct.
Dakota Trotter is a new contributor. Be nice, and check out our Code of Conduct.
Dakota Trotter is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269601%2fattempting-to-override-pager-type-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
try to run setup upgrade , static content deploy , clear chache and then check
– Rk Rathod
yesterday