-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant access elfinder after fresh install #191
Comments
but elfinder.php configuration has : 'route' => [
'prefix' => config('backpack.base.route_prefix').'/elfinder',
'middleware' => ['web', 'auth'], //Set to null to disable middleware filter
], |
Hi @reeslo , I've just installed a fresh copy to test it and it works perfectly for me. Cheers! |
I've installed too time with composer after base package. For the two installations elfinder.route.prefix dont return the complete route Idk why the backpack.base.route_prefix are not parsed in the config file. I set admin path manually. I am at work monday if you want more investigations :) |
for the steps I do all listed like readme.io base, crud, ..., ... |
sorry for multiple messages. The issue was the route not reconized |
What about your base config file, then, in /*
|--------------------------------------------------------------------------
| Routing
|--------------------------------------------------------------------------
*/
// The prefix used in all base routes (the 'admin' in admin/dashboard)
'route_prefix' => 'admin',
// Set this to false if you would like to use your own AuthController and PasswordController
// (you then need to setup your auth routes manually in your routes.php file)
'setup_auth_routes' => true,
// Set this to false if you would like to skip adding the dashboard routes
// (you then need to overwrite the login route on your AuthController)
'setup_dashboard_routes' => true,
/*
|--------------------------------------------------------------------------
| User Model
|--------------------------------------------------------------------------
*/
// Fully qualified namespace of the User model
'user_model_fqn' => '\App\User', I'm more interested in the |
Or if you changed the value in the config file, take a look at |
I've changed the route_prefix value, I have noted difference for adding url in blade template I use url(config(....).'elfinder'). I look monday at work if I Can drop you more informations |
I re-do same steps with a fresh laravel install same issue, I've screenrecorded to show you, config/elfinder.php does not add the config('backpack.base.route_prefix') value. I can access to elfinder http://localhost/public/elfinder like in screenshot |
This is very very weird. Just tried it again, changed the admin prefix and it does work for me. And I used exactly your settings. Video here. So the problem in your case seems that elfinder does not register the modification you made to the elfinder config file. Question: if you edit something else in config/elfinder.php, does the modification register? |
yes it work if I set manually the prefix in config/elfinder.php |
This is weird. Are the Backpack service providers loaded at the END of your /*
* Backpack Service Providers...
*/
Backpack\Base\BaseServiceProvider::class,
Backpack\CRUD\CrudServiceProvider::class,
Backpack\NewsCRUD\NewsCRUDServiceProvider::class,
Backpack\LangFileManager\LangFileManagerServiceProvider::class,
Spatie\Backup\BackupServiceProvider::class,
Backpack\BackupManager\BackupManagerServiceProvider::class,
Backpack\LogManager\LogManagerServiceProvider::class,
Backpack\Settings\SettingsServiceProvider::class,
Backpack\PageManager\PageManagerServiceProvider::class,
Backpack\PermissionManager\PermissionManagerServiceProvider::class,
Backpack\MenuCRUD\MenuCRUDServiceProvider::class,
Backpack\LangFileManager\LangFileManagerServiceProvider::class, |
:( 'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
/*
* Package Service Providers...
*/
/*
* Backpack Service Providers...
*/
Backpack\Base\BaseServiceProvider::class,
Backpack\CRUD\CrudServiceProvider::class,
//
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
], |
Hi @reeslo , figured this out yet? Cheers! |
Hi, sorry I don't understand :x |
Simple solution is to update the public function register()
{
\Config::set(
'elfinder.route.prefix',
\Config::get('backpack.base.route_prefix') . '/elfinder'
); (I'm open to suggestions on if this is the best place, architecturally, to override the elfinder config.) Why This Works In Laravel 4 it appears it was once possible to access variables in the configuration files. This is no longer the case in Laravel 5, by design. Configuration files are loaded too early in the bootstrapping process to access the configuration of another config file (properly, anyway). The new solution is to either use On a last note, I hard-coded the "elfinder" path as suffix to the dynamic path. You might want to instead use the default path the elfinder library uses (which is just |
as @zschuessler has provided a workaround, I'll close this off now, feel free to further discuss, its been added to the list over #285 for future reference |
@zschuessler , I tried again and again and I wasn't able to replicate this issue. The config value gets registered for me. I think we'll implement a solution blindly in this case, because I want you guys to stop having this issue.
// map the elfinder prefix
if (!\Config::get('elfinder.route.prefix')) {
\Config::set('elfinder.route.prefix', \Config::get('backpack.base.route_prefix') . '/elfinder');
} Can you please confirm this solution fixes it for you, in CrudServiceProvider::register()?
Thank a lot, cheers! |
Ok, just pushed an update that should fix it, using the method above. A |
Laravel return only an 404 error, I do all steps.
The text was updated successfully, but these errors were encountered: