0

I have just used composer to install a plugin that sends magento emails using the mailgun api. The command I used was:

composer require bogardo/mailgun-magento2

When I run magento compile I am now presented with this error:

1 exception(s): Exception #0 (Exception): Recoverable Error: Argument 1 passed to leonsvendor\mytheme\Block\TemplateWithProductCollection::__construct() must be an instance of Magento\Framework\View\Element\Template\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /var/www/sandatrade.co.uk/app/code/leonsvendor/mytheme/Block/TemplateWithProductCollection.php on line 9

How do I begin to troubleshoot this issue? It is referencing a template I have created previously in my theme but I have never has this error until installing the mailgun plugin.

Update

After remove the var/generation folder the error is now as follows:

1 exception(s):
Exception #0 (Exception): Recoverable Error: Argument 1 passed to Quickshiftin\Assetorderer\View\Asset\File::setRealFile() must be an instance of Magento\Framework\View\Asset\File, instance of Magento\Framework\View\Asset\Remote given, called in /var/www/sandatrade.co.uk/vendor/quickshiftin/assetorderer/View/Asset/PropertyGroup.php on line 21 and defined in /var/www/sandatrade.co.uk/vendor/quickshiftin/assetorderer/View/Asset/File.php on line 14

Exception #0 (Exception): Recoverable Error: Argument 1 passed to Quickshiftin\Assetorderer\View\Asset\File::setRealFile() must be an instance of Magento\Framework\View\Asset\File, instance of Magento\Framework\View\Asset\Remote given, called in /var/www/sandatrade.co.uk/vendor/quickshiftin/assetorderer/View/Asset/PropertyGroup.php on line 21 and defined in /var/www/sandatrade.co.uk/vendor/quickshiftin/assetorderer/View/Asset/File.php on line 14
#0 /var/www/sandatrade.co.uk/vendor/quickshiftin/assetorderer/View/Asset/File.php(14): Magento\Framework\App\ErrorHandler->handler(4096, 'Argument 1 pass...', '/var/www/sandat...', 14, Array)
#1 /var/www/sandatrade.co.uk/vendor/quickshiftin/assetorderer/View/Asset/PropertyGroup.php(21): Quickshiftin\Assetorderer\View\Asset\File->setRealFile(Object(Magento\Framework\View\Asset\Remote))
#2 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/Interception/Interceptor.php(152): Quickshiftin\Assetorderer\View\Asset\PropertyGroup->afterGetAll(Object(Magento\Framework\View\Asset\PropertyGroup\Interceptor), Array)
#3 /var/www/sandatrade.co.uk/var/generation/Magento/Framework/View/Asset/PropertyGroup/Interceptor.php(104): Magento\Framework\View\Asset\PropertyGroup\Interceptor->___callPlugins('getAll', Array, Array)
#4 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/View/Page/Config/Renderer.php(239): Magento\Framework\View\Asset\PropertyGroup\Interceptor->getAll()
#5 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/View/Page/Config/Renderer.php(226): Magento\Framework\View\Page\Config\Renderer->renderAssetGroup(Object(Magento\Framework\View\Asset\PropertyGroup\Interceptor))
#6 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento\Framework\View\Page\Config\Renderer->renderAssets(Array)
#7 /var/www/sandatrade.co.uk/var/generation/Magento/Framework/View/Page/Config/Renderer/Interceptor.php(91): Magento\Framework\View\Page\Config\Renderer\Interceptor->___callPlugins('renderAssets', Array, Array)
#8 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/View/Page/Config/Renderer.php(99): Magento\Framework\View\Page\Config\Renderer\Interceptor->renderAssets(Array)
#9 /var/www/sandatrade.co.uk/var/generation/Magento/Framework/View/Page/Config/Renderer/Interceptor.php(37): Magento\Framework\View\Page\Config\Renderer->renderHeadContent()
#10 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/View/Result/Page.php(235): Magento\Framework\View\Page\Config\Renderer\Interceptor->renderHeadContent()
#11 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/View/Result/Layout.php(164): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#12 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/Interception/Interceptor.php(74): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#13 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/Interception/Chain/Chain.php(70): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#14 /var/www/sandatrade.co.uk/lib/internal/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-...')
#15 /var/www/sandatrade.co.uk/app/code/Magento/PageCache/Model/Controller/Result/VarnishPlugin.php(74): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#16 /var/www/sandatrade.co.uk/lib/internal/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))
#17 /var/www/sandatrade.co.uk/lib/internal/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-...')
#18 /var/www/sandatrade.co.uk/app/code/Magento/PageCache/Model/Controller/Result/BuiltinPlugin.php(67): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#19 /var/www/sandatrade.co.uk/lib/internal/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))
#20 /var/www/sandatrade.co.uk/var/generation/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#21 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#22 /var/www/sandatrade.co.uk/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#23 /var/www/sandatrade.co.uk/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#24 {main}
  • Seem that your Magento is on production mode? Delete var/generation and try again. – Khoa TruongDinh Mar 24 '17 at 14:14
  • I have just deleted the generation folder and now the error is shown in my updated post above. It mentions quickshiftin - I can't find any info on what that is? – Hunter Mar 24 '17 at 14:28
  • And magento is in dev mode. – Hunter Mar 24 '17 at 14:37
  • So it turned out to be a dodgy plugin causing the issue and not the mailgun plugin. – Hunter Mar 24 '17 at 15:36

Your Answer

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

Browse other questions tagged or ask your own question.