|
protected function getViewVars() |
The reason is in original method there is $dir param:
protected function getViewVars()
{
$dir = 'packages/barryvdh/' . $this->package;
$locale = str_replace("-", "_", $this->app->config->get('app.locale'));
if (!file_exists($this->app['path.public'] . "/$dir/js/i18n/elfinder.$locale.js")) {
$locale = false;
}
$csrf = true;
return compact('dir', 'locale', 'csrf');
}
Since your plugin overwrites this method, views from Elfinder package cant find variable $dir and failing to error.
Code in elfinder's tinymce5.blade.php
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="{{ asset($dir.'/css/elfinder.min.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset($dir.'/css/theme.css') }}">
<!-- elFinder JS (REQUIRED) -->
<script src="{{ asset($dir.'/js/elfinder.min.js') }}"></script>
@if($locale)
<!-- elFinder translation (OPTIONAL) -->
<script src="{{ asset($dir."/js/i18n/elfinder.$locale.js") }}"></script>
@endif
FileManager/src/BackpackElfinderController.php
Line 50 in 78c0408
The reason is in original method there is
$dirparam:Since your plugin overwrites this method, views from Elfinder package cant find variable
$dirand failing to error.Code in elfinder's tinymce5.blade.php