如何解决此 magento 2 apptha 市场问题?

How to fix this magento 2 apptha marketplace issue?

1 个例外:

Exception #0 (Exception): Notice: Undefined offset: 1 in /var/www/html/magento2/app/code/Apptha/Marketplace/view/frontend/templates/product/manage.phtml on line 191

Exception #0 (Exception): Notice: Undefined offset: 1 in /var/www/html/magento2/app/code/Apptha/Marketplace/view/frontend/templates/product/manage.phtml on line 191
#0 /var/www/html/magento2/app/code/Apptha/Marketplace/view/frontend/templates/product/manage.phtml(191): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined offse...', '/var/www/html/m...', 191, Array)
#1 /var/www/html/magento2/lib/internal/Magento/Framework/View/TemplateEngine/Php.php(59): include('/var/www/html/m...')
#2 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/Template.php(255): Magento\Framework\View\TemplateEngine\Php->render(Object(Apptha\Marketplace\Block\Product\Manage), '/var/www/html/m...', Array)
#3 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/Template.php(279): Magento\Framework\View\Element\Template->fetchView('/var/www/html/m...')
#4 /var/www/html/magento2/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(659): Magento\Framework\View\Element\Template->_toHtml()
#5 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(542): Magento\Framework\View\Element\AbstractBlock->toHtml()
#6 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('marketplace_pro...')
#7 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('marketplace_pro...')
#8 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(570): Magento\Framework\View\Layout->renderElement('marketplace_pro...', false)
#9 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('content', false)
#10 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('content')
#11 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(570): Magento\Framework\View\Layout->renderElement('content', false)
#12 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('main', false)
#13 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('main')
#14 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(570): Magento\Framework\View\Layout->renderElement('main', false)
#15 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('columns', false)
#16 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#17 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(570): Magento\Framework\View\Layout->renderElement('columns', false)
#18 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('main.content', false)
#19 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('main.content')
#20 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(570): Magento\Framework\View\Layout->renderElement('main.content', false)
#21 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#22 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#23 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(570): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#24 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('root', false)
#25 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('root')
#26 /var/www/html/magento2/lib/internal/Magento/Framework/View/Layout.php(939): Magento\Framework\View\Layout->renderElement('root')
#27 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento\Framework\View\Layout->getOutput()
#28 /var/www/html/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(39): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#29 /var/www/html/magento2/lib/internal/Magento/Framework/View/Result/Page.php(243): Magento\Framework\View\Layout\Interceptor->getOutput()
#30 /var/www/html/magento2/lib/internal/Magento/Framework/View/Result/Layout.php(167): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#31 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(74): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#32 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(70): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#33 /var/www/html/magento2/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-...')
#34 /var/www/html/magento2/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))
#35 /var/www/html/magento2/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))
#36 /var/www/html/magento2/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-...')
#37 /var/www/html/magento2/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))
#38 /var/www/html/magento2/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))
#39 /var/www/html/magento2/var/generation/Magento/Framework/View/Result/Page/Interceptor.php(26): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#40 /var/www/html/magento2/lib/internal/Magento/Framework/App/View.php(221): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#41 /var/www/html/magento2/app/code/Apptha/Marketplace/Controller/Product/Manage.php(73): Magento\Framework\App\View->renderLayout()
#42 /var/www/html/magento2/lib/internal/Magento/Framework/App/Action/Action.php(102): Apptha\Marketplace\Controller\Product\Manage->execute()
#43 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#44 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(70): Apptha\Marketplace\Controller\Product\Manage\Interceptor->___callParent('dispatch', Array)
#45 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Apptha\Marketpl...', 'dispatch', Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Array, 'contextPlugin')
#46 /var/www/html/magento2/app/code/Magento/Store/App/Action/Plugin/Context.php(106): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#47 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#48 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Apptha\Marketpl...', 'dispatch', Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Array, 'customer-app-ac...')
#49 /var/www/html/magento2/app/code/Magento/Customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#50 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#51 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Apptha\Marketpl...', 'dispatch', Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Array, 'storeCheck')
#52 /var/www/html/magento2/app/code/Magento/Store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#53 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#54 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Apptha\Marketpl...', 'dispatch', Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Array, 'weee-app-action...')
#55 /var/www/html/magento2/app/code/Magento/Weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#56 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#57 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Apptha\Marketpl...', 'dispatch', Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Array, 'tax-app-action-...')
#58 /var/www/html/magento2/app/code/Magento/Tax/Model/App/Action/ContextPlugin.php(91): Apptha\Marketplace\Controller\Product\Manage\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#59 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Apptha\Marketplace\Controller\Product\Manage\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#60 /var/www/html/magento2/var/generation/Apptha/Marketplace/Controller/Product/Manage/Interceptor.php(26): Apptha\Marketplace\Controller\Product\Manage\Interceptor->___callPlugins('dispatch', Array, Array)
#61 /var/www/html/magento2/lib/internal/Magento/Framework/App/FrontController.php(55): Apptha\Marketplace\Controller\Product\Manage\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#62 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#63 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#64 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
#65 /var/www/html/magento2/app/code/Magento/Store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#66 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#67 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#68 /var/www/html/magento2/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#69 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#70 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#71 /var/www/html/magento2/app/code/Magento/PageCache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#72 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#73 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#74 /var/www/html/magento2/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#75 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#76 /var/www/html/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#77 /var/www/html/magento2/lib/internal/Magento/Framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#78 /var/www/html/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#79 /var/www/html/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#80 {main}

在 magento 2 Apptha 市场中添加 10 个产品后,它抛出这样的异常...

这是默认包问题,块文件中的页面限制设置为“10”,

$pager->setLimit(10);

(行号:114)在文件 /app/code/Apptha/Marketplace/Block/Product/Manage.php

如果您将限制增加到 10 以上意味着产品将根据限制显示(每页)。