bnomei / kirby3-srcset

Kirby 3 Plugin for creating lazyloading image srcset
https://forum.getkirby.com/t/kirby-3-srcset-lazyloading-image-srcset-element/23575
MIT License
43 stars 3 forks source link

Warning with Editor Plugin #15

Closed DenisLanz closed 5 years ago

DenisLanz commented 5 years ago

I'm getting a warning when installing your plugin:

Warning: include([…]site/plugins/kirby3-srcset/classes/Kirby/Editor/../../../tests/site/plugins/editor/lib/Block.php): failed to open stream: No such file or directory in […]/kirby/config/helpers.php on line 496

thought it might be because I haven't installed the Editor Beta yet, but it is also happens if the Editor Plugin is available. Might be related to an autoloader issue as I'm using kirby-cms-path and kirby-plugin-path to alter my composer setup.

bnomei commented 5 years ago

thanks for reporting. does this warning show up in php logs only or does the kirby error page (whoops) appear?

i use the loader for my test setup... it should only kick in if the editors class is not loaded once the srcset plugin loads. https://github.com/bnomei/kirby3-srcset/blob/master/classes/Kirby/Editor/SrcsetBlock.php#L7

pathes should not matter. have you tried removing the composer.lock file?

DenisLanz commented 5 years ago

Yes I removed the composer.lock without success - error is thrown by xdebug/apache log.

#   Time    Memory  Function    Location
1   0.0002  405568  {main}( )   .../index.php:0
2   0.0009  405872  require( '[…]/vendor/autoload.php' )    .../index.php:3
3   0.0010  406552  ComposerAutoloaderInit9c6296bee2e0ab782c42180ef7b466d8::getLoader( )    .../autoload.php:7
4   0.0021  417176  composerRequire9c6296bee2e0ab782c42180ef7b466d8( )  .../autoload_real.php:56
5   0.0024  417744  require( '[…]/build/site/plugins/kirby3-srcset/classes/Kirby/Editor/SrcsetBlock.php' )  .../autoload_real.php:66
6   0.0025  418912  class_exists ( )    .../SrcsetBlock.php:13
7   0.0025  418960  spl_autoload_call ( )   .../SrcsetBlock.php:13
8   0.0026  419008  {closure:[…]/build/kirby/config/helpers.php:486-498}( ) .../SrcsetBlock.php:13

the stack trace was why I thought it is related to the autoloader

bnomei commented 5 years ago

i have some time tomorrow to do testings with most current version of editor. i will report back then.

DenisLanz commented 5 years ago

There is an output in the browser through xdebug, it's a warning not an error so I could ignore it. Plugins are bare minimum: feeds, srcset, xmlsitemap and the editor.

DenisLanz commented 5 years ago

Works like a charm now. Thanks