zimmer-partners / Kirby-Calendar

Kirby Plugin to Expose Calendar Data as iCal format.
6 stars 0 forks source link

Failed opening required Calcreator.php #8

Open krlklm opened 7 years ago

krlklm commented 7 years ago

I'm not sure if i'm doing something wrong, but when i extract your plugin to /site/plugins/calendar in kirby-langkit version 2.5.6 i get this error when i try to open the panel:

Whoops \ Exception \ ErrorException (E_COMPILE_ERROR) Kirby::main(): Failed opening required '/Users/kliem/Sites/htdocs/langkit-master/site/plugins/calendar/lib/iCalcreator/iCalcreator.php' (include_path='.:/Applications/MAMP/bin/php/php7.1.8/lib/php')

moritzz commented 6 years ago

Hi @krlklm

I just added a test setup to http://xn--zrinord-n2a.org/home/orangerie/kalender and everything seams to work pretty well. I’m not a MAMP user, but it seams as the line...

require_once(__DIR__ . '/lib/iCalcreator/iCalcreator.php');

... fails there, because __DIR__ does not return the path of the plugin file itself, but the file MAMP includes. I have no idea how to resolve this...

Cheers,
Moritz

moritzz commented 6 years ago

Hast Du, @bastianallgeier, vielleicht eine Idee, wie ich in einem Plugin eine Bibliothek richtig inkludieren kann, ohne, wie in https://github.com/moritzz/Kirby-Calendar/blob/26ccfb110d176a995fba32d6725f531444bef7c5/calendar.php#L28, __DIR__verwenden zu müssen?