barryvdh / laravel-elfinder

elFinder bundle for Laravel
740 stars 171 forks source link

Class App\Http\Controllers\Barryvdh\Elfinder\ElfinderController does not exist #52

Open 0147500 opened 9 years ago

0147500 commented 9 years ago

Hello,

I just did a fresh install for elfinder and now im getting the following error when i want to add it. Im using laravel 5.

Class App\Http\Controllers\Barryvdh\Elfinder\ElfinderController does not exist

My router file is a following:

Route::get('/elfinder/tinymce','Barryvdh\Elfinder\ElfinderController@showTinyMCE4');

Any idear on what i do wrong?

Regards,

Robert

barryvdh commented 9 years ago

Yeah don't add the routes manually. That's changed since L5:

Routes are added in the ElfinderServiceProvider. You can set the group parameters for the routes in the configuration. You can change the prefix or filter/middleware for the routes. If you want full customisation, you can extend the ServiceProvider and override the map() function.

0147500 commented 9 years ago

Hmm okay Thanks i missed that. But now i have removed the route and i get the following error:

ReflectionException in Container.php line 776:
Class does not exist

When i browse to elfinder/tinymce

Do i need to add something somwhere?

Regards,

Robert

barryvdh commented 9 years ago

These are the routes:

        $router->get('/', 'ElfinderController@showIndex');
        $router->any('connector', 'ElfinderController@showConnector');
        $router->get('popup', 'ElfinderController@showPopup');
        $router->get('tinymce', 'ElfinderController@showTinyMCE');
        $router->get('tinymce4', 'ElfinderController@showTinyMCE4');
        $router->get('ckeditor', 'ElfinderController@showCKeditor4');

Do none of them work? You did add the ServiceProvider right? Any more clues in the exception/stacktrace?

0147500 commented 9 years ago

Jup i have added the serviceprovider This is the full stacktrace: http://puu.sh/fZr9m/c3a1b1cc58.png http://puu.sh/fZrba/4615c4ef53.png

And non of the routes work. :(

ghost commented 9 years ago

vendor can not find the way . Direct App / Contoller are looking at

Route::get('elfinder', 'Barryvdh\Elfinder\ElfinderController@showTinyMCE4'); or Route::get('elfinder', 'ElfinderController@showTinyMCE4');

successful vendor to publish publish settings successful :s

lijith commented 9 years ago

hi, i tried your package, it is not working.

if i try /elfinder route then i get the error

ReflectionException in Container.php line 776: Class null does not exist

/elfinder/ckeditor4 route gives NotFoundHttpException in RouteCollection.php line 145

tuytoosh commented 9 years ago

I too have exactly this problem ;

barryvdh commented 9 years ago

With 0.3.3?

lijith commented 9 years ago

yes 0.3.*

tuytoosh commented 9 years ago

Yes ,with v0.3.3

I need it ,please help

barryvdh commented 9 years ago

Try clearing compiled files and route/config cache.

lijith commented 9 years ago

do you mean the composer/autoload_classmap.php please tell where is route/config cache

lijith commented 9 years ago

i tried a fresh install of l5 but the result is same. So i put the route in route file and the elfinder page loads with error saying ' cannot connect to the back-end '. i checked in firebug for errors and it shows 500 response on elfinder/connector. when i put that route on routes files it gives ReflectionException in Container.php line 776: Class null does not exist

tuytoosh commented 9 years ago

"Try clearing compiled files and route/config cache." from where???

I have some cache folder in my project... cache

barryvdh commented 9 years ago

php artisan cache:clear php artisan config:clear php artisan route:clear

But it could be there is just an error somewhere.

You aren't setting the routes yourself in routes.php or anything, right?

lijith commented 9 years ago

no, nothing in the route, and just to make sure i haven't done something wrong i did a fresh install of L5

tuytoosh commented 9 years ago

No , I`m not set any routs manually...

barryvdh commented 9 years ago

Did you publish the views? If so, overwrite them for the latest version

php artisan vendor:publish --provider='Barryvdh\Elfinder\ElfinderServiceProvider' --tag=views

lijith commented 9 years ago

result from routes in service provider elfinder - Class null does not exist elfinder/ckeditor - Class null does not exist

tuytoosh commented 9 years ago

once again i say that works that i did... ---i now install a fresh version of laravel 5

---next i run "composer require barryvdh/laravel-elfinder" command and packege downloaded successfully

---I add the 'Barryvdh\Elfinder\ElfinderServiceProvider' service provider in app/config.php

---in home view i add a text area and attach to it ckeditor with this script "CKEDITOR.replace( 'desc');" and i add "config.filebrowserBrowseUrl = '/elfinder/ckeditor4'; " in ckeditor config file and ckeditor is work correctly...

===when I click the "browse server" in ckeditor not found page is viewed...

notf

did must i do somthing else???

tuytoosh commented 9 years ago

surely my work is incorrect because the url is not in my laravel directory...

it seems that "config.filebrowserBrowseUrl = '/elfinder/ckeditor4" is not correct

what is correct url?

tuytoosh commented 9 years ago

I have created a "files" folder in my public directory as you say...

lijith commented 9 years ago

route elfinder

ReflectionException in Container.php line 776: Class null does not exist

in Container.php line 776
at ReflectionClass->__construct('null') in Container.php line 776
at Container->build('null', array()) in Container.php line 656
at Container->make('null', array()) in Application.php line 613
at Application->make('null') in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in Router.php line 693
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 660
at Router->dispatchToRoute(object(Request)) in Router.php line 618
at Router->dispatch(object(Request)) in Kernel.php line 210
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 43
at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 17
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 55
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 61
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 36
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 40
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 42
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in Kernel.php line 111
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
at Kernel->handle(object(Request)) in index.php line 53
barryvdh commented 9 years ago

/elfinder/ckeditor is default for ckeditor.

Fixed the routes in the readme. https://github.com/barryvdh/laravel-elfinder/commit/e3357dbf8f37b9b5debc69bac0896aa415f4a819

lijith commented 9 years ago

the url that opens when i click browe server is below http://elftest.dev/elfinder/ckeditor?CKEditor=ckeditor1&CKEditorFuncNum=3&langCode=en

error ReflectionException in Container.php line 776: Class null does not exist

in Container.php line 776
at ReflectionClass->__construct('null') in Container.php line 776
at Container->build('null', array()) in Container.php line 656
at Container->make('null', array()) in Application.php line 642
at Application->make('null') in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in Router.php line 694
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 661
at Router->dispatchToRoute(object(Request)) in Router.php line 619
at Router->dispatch(object(Request)) in Kernel.php line 214
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 43
at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 17
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 55
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 61
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 36
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 40
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 42
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in Kernel.php line 115
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
at Kernel->handle(object(Request)) in index.php line 53

Whoops, looks like something went wrong. 1/1 ReflectionException in Container.php line 776: Class null does not exist

in Container.php line 776
at ReflectionClass->__construct('null') in Container.php line 776
at Container->build('null', array()) in Container.php line 656
at Container->make('null', array()) in Application.php line 642
at Application->make('null') in Kernel.php line 131
at Kernel->terminate(object(Request), object(Response)) in index.php line 57
tuytoosh commented 9 years ago

my problem solved with : config.filebrowserBrowseUrl = 'elfinder/ckeditor';

thank you barryvdh

lijith commented 9 years ago

@tuytoosh no luck here man whats is your response to elfinder/ckeditor route ?

tuytoosh commented 9 years ago

you don`t need any manually rout... routs are added

only add this(and this and this :) ) line in your ckeditor config.js file : config.filebrowserBrowseUrl = 'elfinder/ckeditor';

lijith commented 9 years ago

@tuytoosh yes i know, the routes are listed but when i try the route it give error ReflectionException in Container.php line 776: Class null does not exist also what did you put in config/elfinder disks array? mine is empty

tuytoosh commented 9 years ago

I have a "files" folder in my public directory and it is not important full or empty... you don`t need to create disks manually...

now type this in your browser : yourproject/elfinder/ckeditor

are you see elfinder file manager?

lijith commented 9 years ago

@tuytoosh err

barryvdh commented 9 years ago

Did you name your middleware 'null' instead of null?

tuytoosh commented 9 years ago

if you have public in your project type this yourproject/public/elfinder/ckeditor

:)

lijith commented 9 years ago

@barryvdh @tuytoosh yes !! silly mistake. what a shame, and i was staring at it all the time shm. thanks for bearing with me guys

wordpress-lab commented 9 years ago

sir , i am facing ......class not found problem

farazwebman commented 8 years ago

hi I have a problem with "barryvdh/laravel-elfinder": "^0.3.8" I'm with laravel 5.1 not find

app

@barryvdh plz help me .....