greenrivers / grav-plugin-webp

Grav Webp plugin.
MIT License
11 stars 0 forks source link

Undefined offset: 2 error #2

Closed 01Kuzma closed 3 years ago

01Kuzma commented 3 years ago

Hi! Just installed on localhost 1.0.3 version and Grav 1.7.7. So, after plugin install in admin area I see this window: image

Can't delete the plugin from admin area and can't access a website

And here is log:

[2021-02-28 19:00:04] grav.CRITICAL: Undefined offset: 2 - Trace: #0 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Common\Debugger.php(843): Whoops\Run->handleError(8, 'Undefined offse...', 'C:\\xampp\\htdocs...', 68) #1 C:\xampp\htdocs\transportopaslaugos\user\plugins\webp\webp.php(68): Grav\Common\Debugger->deprecatedErrorHandler(8, 'Undefined offse...', 'C:\\xampp\\htdocs...', 68, Array) #2 C:\xampp\htdocs\transportopaslaugos\vendor\symfony\event-dispatcher\EventDispatcher.php(264): Grav\Plugin\WebpPlugin->onPagesInitialized(Object(RocketTheme\Toolbox\Event\Event), 'onPluginsInitia...', Object(Symfony\Component\EventDispatcher\EventDispatcher)) #3 C:\xampp\htdocs\transportopaslaugos\vendor\symfony\event-dispatcher\EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'onPluginsInitia...', Object(RocketTheme\Toolbox\Event\Event)) #4 C:\xampp\htdocs\transportopaslaugos\vendor\symfony\event-dispatcher\EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'onPluginsInitia...', Object(RocketTheme\Toolbox\Event\Event)) #5 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Common\Grav.php(550): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(RocketTheme\Toolbox\Event\Event), 'onPluginsInitia...') #6 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Common\Processors\PluginsProcessor.php(36): Grav\Common\Grav->fireEvent('onPluginsInitia...') #7 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\PluginsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #8 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #9 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Common\Processors\InitializeProcessor.php(129): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #10 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Common\Debugger.php(546): Grav\Common\Processors\InitializeProcessor::Grav\Common\Processors\{closure}() #11 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Common\Processors\InitializeProcessor.php(130): Grav\Common\Debugger->profile(Object(Closure)) #12 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(50): Grav\Common\Processors\InitializeProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #13 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Framework\RequestHandler\Traits\RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #14 C:\xampp\htdocs\transportopaslaugos\system\src\Grav\Common\Grav.php(295): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #15 C:\xampp\htdocs\transportopaslaugos\index.php(58): Grav\Common\Grav->process() #16 {main} [] []

01Kuzma commented 3 years ago

image

MajorKuprich commented 3 years ago

Hi @01Kuzma,

Thank You for issue detect. Could You give me more info i. e.: page url + PHP version?

01Kuzma commented 3 years ago

Hello, @MajorKuprich I'm testing this particular website version on localhost. The PHP Version is 7.4.14 running on XAMPP

MajorKuprich commented 3 years ago

Ok thx, could You send me url You see in the web browser?

01Kuzma commented 3 years ago

That's strange, I've made a copy of website, placed it on hosting and plugin started working. So, the a problem is in localhost. I could make assumption that the problem here is that I'm running it under Windows and therefore any paths has \ instead of /.

MajorKuprich commented 3 years ago

It's good to hear it, that plugin works :-) That kind of slash is correct:/ Unfortunately I don't know Your url which You tested it on local machine, so I can't say nothing more.