Elfinder file upload throwing MethodNotAllowedHttpException in RouteCollection.php line 207 - laravel-5

Im using Laravel 5 with CKEditor and ElFinder.
Ive added
config.filebrowserUploadUrl = '/elfinder/ckeditor';
to editor.config in ckeditor/config.js. Ive got the upload tab, but when I add an image and click Send to Server I get the exception:
MethodNotAllowedHttpException in RouteCollection.php line 207
which normally gets tossed when the route verb is incorrect (GET rather then POST or something like that). Is there another setting I need to enact in elfinder config?
Console debug is throwing a 500 error on this url thats being called:
http://main.local/elfinder/ckeditor?CKEditor=description&CKEditorFuncNum=1&langCode=en

Related

Livewire actions get 302 response

I have a laravel project deployed on a domain subfolder
https://example.com => another project
https://example.com/dashboard => my laravel project
I have set my livewire config asset_url to config('app.url'), which my .env's APP_URL is https://example.com/dashboard
It is a simple project that has an auth middleware which protect https://example.com/dashboard and redirect it to https://example.com/dashboard/login. And when I try to fill the input (it has wire:model attribute), I get an error at my JS console
Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at index.js:58
When I check the Network tab, there were some process:
https://example.com/dashboard/livewire/message/login (post) => 302 (i think it is not expected)
https://example.com/dashboard/login (get) => 200 (i think it makes the error above)
It works fine if I deploy it to https://example.com, but at https://example.com/dashboard it keeps getting this issue
Could you guys help me?
Take a look at the livewire.php config folder, maybe you have to change the path for the Livewire assets

VerifyCsrfToken error with no status or message on line 82 Laravel

In Exceptions/Handler.php i added some logic to send an email with every exception from my flow ( i added this to report method ).
In my flow i have severals forms and from time to time i get an email with an error on line 82 in file: Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php . At this line is this "throw new TokenMismatchException ".
After reading some questions & answers i added csrf token to my forms.
The thing is i can't reproduce this error and the exception doesn't have any error code or message.
Beside that, in laravel.log there's no error about csrf.
My questions are:
Is this error flow breaking? I've made the flow several times and i didn't get any error, but if this exception will be throwed when a customer is in the flow, it will break the flow ( i mean it will be redirected to an error page ) or the client will know nothing?
Why this error is not in laravel.log?
Do you have any idea what can i do to fix this error?

ErrorException error issue in laravel how can i redirect this another custom error page

When I got an error in laravel site then i have received this error page.I want to redirect to another page which I have created custom looks like a valid error page.
enter image description here
enter image description here
First in your .env file (in your project's root) set false for app_debug ->
APP_DEBUG=false
Then create a file named 500.blade.php that contains your custom html css in (resources\views\errors)
Done.
(for others errors like 404 , 503 , just change the name of file to that error code)
More information Here

blueimp jQuery-File-Upload not working for laravel 5

i am using , https://github.com/blueimp/jQuery-File-Upload plugin for image upload using ajax call in laravel 5. i also refered article http://peterjolson.com/using-laravel-and-jquery-file-upload/. but i am getting the following error error
GET http://localhost:8000/...../server/php/ 500 (Internal
Server Error)
when i use https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin i get the same error. Can anyone help with this or please suggest any working image uploader with ajax call for laravel 5
There is a main.js file, you need to adjust the url there according to the path you store it:
url: '../../uploadimage/server/php/'

Magento - blank homepage and "Fatal error: ../app/code/core/Mage/Captcha/Block/Captcha.php on line 43" in admin

My Magento site has suddenly stopped working. The homepage loads a blank page, and when I go to the admin I get the following error:
Fatal error: Call to a member function getBlockName() on a non-object in ../app/code/core/Mage/Captcha/Block/Captcha.php on line 43
I have deleted the cache and session files but this didn't have any effect.
Make sure your Var folder has proper permission.
When captcha image are created they first get store in var folder.
Due to improper permission images will not be saved.This will result in a NULL object hence that error.
If your store doesn't use captcha, then rename the folder ./app/code/core/Mage/Captcha/ to something other like ./app/code/core/Mage/Captcha_old/ then you can access the site.

Resources