Tommy001's avatar

Can't figure out difference between local, stage and production site

Using GIT I have built a Laravel site, which among other things uses Laravel File Manager. Locally everything works and when I just transfer ALL files manualy with FileZilla to a folder on my webserver, it also works just fine. All routes that use Laravel Filemanager works fine and there are no problems.

BUT, when I navigate to another folder in my webserver and clone the github repo (which is up-to-date), on the same folder level, everything still works EXCEPT for Laravel Filemanager. When I try to upload an image, for example, I get an "Object not found" and a 404 messsage.

So the only thing that differs is that in the latter case I am using GIT (which is what I want to do, not just keeping track of all changes on my own and transfer files manually). So the conclusion would be that something is left out by .gitignore, that shouldn't be left out. But this is the .gitignore file:

/public/hot
/public/photos
/public/storage
/storage/*.key
/.idea
/.vscode
npm-debug.log
yarn-error.log
.env

I manually transferred the .env file and the public/photo and public/storage folders and files. I have also cleared routes and config cache whithout any luck. I have spent hours comparing files and folders between the three sites (locally, and the two remote sites) trying to figure out why Laravel Filemanager is not found in just the one using GIT.

I have already posted a similar question on the same topic, but the solution that time was to manually transfer all files to the webserver, and I really need to be able to use git building my laravel sites, so I post the question once more.

Can anyone help?

0 likes
1 reply
Tommy001's avatar

I finally figured it out... in case anyone else has the same problem. Row 7 of the file /vendor/unisharp/laravel-filemanager/public/js/lfm.js:

var route_prefix = (options && options.prefix) ? options.prefix : '/laravel-filemanager';

In my case I had to change the path to '/mysite/public/laravel-filemanager'. After that it worked :-).

Please or to participate in this conversation.