1

I am getting strange issue. I removed var folder and loaded the page .but no luck.

I am using marketplace multi-vender extension as you can see in paths.

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid method Webkul\Marketplace\Block\Collection\Interceptor::__

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid method Webkul\Marketplace\Block\Collection\Interceptor::__
#0 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Webkul/Marketplace/Block/Collection/Interceptor.php(1376): Magento\Framework\DataObject->__call('__', Array)
#1 [internal function]: Webkul\Marketplace\Block\Collection\Interceptor->__call('__', Array)
#2 [internal function]: Webkul\Marketplace\Block\Collection\Interceptor->__('There are no pr...')
#3 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/TemplateEngine/Php.php(82): call_user_func_array(Array, Array)
#4 /home/pocketgrocery/staging.pocketgrocery.com/app/code/Webkul/Agorae/view/frontend/templates/marketplace/seller_pick_collection.phtml(41): Magento\Framework\View\TemplateEngine\Php->__call('__', Array)
#5 /home/pocketgrocery/staging.pocketgrocery.com/app/code/Webkul/Agorae/view/frontend/templates/marketplace/seller_pick_collection.phtml(41): Magento\Framework\View\TemplateEngine\Php->__('There are no pr...')
#6 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/home/pocketgro...')
#7 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Webkul\Marketplace\Block\Collection\Interceptor), '/home/pocketgro...', Array)
#8 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Webkul/Marketplace/Block/Collection/Interceptor.php(609): Magento\Framework\View\Element\Template->fetchView('/home/pocketgro...')
#9 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Element/Template.php(279): Webkul\Marketplace\Block\Collection\Interceptor->fetchView('/home/pocketgro...')
#10 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Element/AbstractBlock.php(659): Magento\Framework\View\Element\Template->_toHtml()
#11 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Webkul/Marketplace/Block/Collection/Interceptor.php(934): Magento\Framework\View\Element\AbstractBlock->toHtml()
#12 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(542): Webkul\Marketplace\Block\Collection\Interceptor->toHtml()
#13 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('agorae_mp_selle...')
#14 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('agorae_mp_selle...')
#15 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('agorae_mp_selle...')
#16 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('agorae_mp_selle...', true)
#17 /home/pocketgrocery/staging.pocketgrocery.com/app/code/Webkul/Agorae/view/frontend/templates/marketplace/collection_view.phtml(26): Magento\Framework\View\Layout\Interceptor->renderElement('agorae_mp_selle...')
#18 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/home/pocketgro...')
#19 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Webkul\Marketplace\Block\Collection\Interceptor), '/home/pocketgro...', Array)
#20 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Webkul/Marketplace/Block/Collection/Interceptor.php(609): Magento\Framework\View\Element\Template->fetchView('/home/pocketgro...')
#21 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Element/Template.php(279): Webkul\Marketplace\Block\Collection\Interceptor->fetchView('/home/pocketgro...')
#22 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Element/AbstractBlock.php(659): Magento\Framework\View\Element\Template->_toHtml()
#23 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Webkul/Marketplace/Block/Collection/Interceptor.php(934): Magento\Framework\View\Element\AbstractBlock->toHtml()
#24 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(542): Webkul\Marketplace\Block\Collection\Interceptor->toHtml()
#25 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('agorae_mp_colle...')
#26 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('agorae_mp_colle...')
#27 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('agorae_mp_colle...')
#28 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('agorae_mp_colle...', true)
#29 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('agorae_mp_colle...')
#30 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('content')
#31 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('content')
#32 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content')
#33 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('content', true)
#34 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('content')
#35 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('main')
#36 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main')
#37 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main')
#38 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main', true)
#39 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('main')
#40 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('columns')
#41 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#42 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns')
#43 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('columns', true)
#44 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('columns')
#45 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('main.content')
#46 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.content')
#47 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content')
#48 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.content', true)
#49 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('main.content')
#50 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('page.wrapper')
#51 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#52 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#53 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', true)
#54 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')
#55 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('root')
#56 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#57 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#58 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#59 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Layout.php(938): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#60 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\View\Layout->getOutput()
#61 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#62 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Result/Page.php(243): Magento\Framework\View\Layout\Interceptor->getOutput()
#63 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/View/Result/Layout.php(164): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#64 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#65 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#66 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult', Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-varnish-...')
#67 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/module-page-cache/Model/Controller/Result/VarnishPlugin.php(74): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#68 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\Controller\Result\VarnishPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#69 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult', Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-builtin-...')
#70 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/module-page-cache/Model/Controller/Result/BuiltinPlugin.php(67): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#71 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\Controller\Result\BuiltinPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#72 /home/pocketgrocery/staging.pocketgrocery.com/var/generation/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#73 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#74 /home/pocketgrocery/staging.pocketgrocery.com/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#75 /home/pocketgrocery/staging.pocketgrocery.com/index.php(43): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#76 {main}
0

You need to run the compile command.

php bin/magento setup:di:compile

After installing or after having changes in some in extension codes, you need to run this command. This will accomodate the latest changes and thus create appropriate interceptors.

You are also required to run setup:upgrade in case the module is just installed (in prior to run the compile command)

php bin/magento setup:upgrade

EDIT

You need to run compile command in development mode too. Please read the official documentation here. In development mode, static files will be generated in each request. But interceptors are created only when we run the di:compile command

| improve this answer | |
  • 2
    @KeyurShah got some free time today (unexpected !!!). I spent my free time with the community :) – Rajeev K Tomy Sep 25 '17 at 10:10
  • Good to hear that :) @Rajeev – Keyur Shah Sep 25 '17 at 10:12
  • @RajeevKTomy magento 2 is in developer mode so do I still need to run compile? – Peter Sep 25 '17 at 10:18
  • @KeyurShah would you like to add any suggestions – Peter Sep 25 '17 at 10:19
  • @Peter Yes, you need to do. developer mode wont do compilation in each request. – Rajeev K Tomy Sep 25 '17 at 10:23
0

I solved this problem via belwo command hope some one help this

cd magento_root

      find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
      find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
      chown -R :www-data .
      chmod u+x bin/magento
     // php bin/magento setup:di:compile
| improve this answer | |
0

I got this after calling a helper method:

<referenceBlock name="category.products.list">
    <arguments>
        <argument name="test" xsi:type="helper" helper="Company\Base\Helper\Product::footest" />
    </arguments>
</referenceBlock>

The helper has argument name "test", but I called it like this:

WRONG:

<?php $block->footest($_product); ?>

CORRECT:

<?php $block->getTest($_product); ?>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.