Solved
kaprinkey1

Dec 29th, 2023 12:39 PM

Hey guys.

It is Keith again, LOL!

I recently FTP shop4charities from my IONOS server to my laptop. I transferred every single file except the node_modules folder and starting to think I should have because it reset voyager entirely which reset a partial portion of my homepage. The rest of Wave remained intact:


My question is, do you know of a way to keep voyager from doing this when I send it back? Literally, everything else stayed the same as expected. I was not expecting this lol because I had altered Voyager and added bread which is no longer there? Any idea what I need to do? This is new to me. My images are all not appearing but are present in Voyager? This is so fucking weird LOL. I am getting database errors as well but the tables are present. This is irritating the fuck out of me because I worked my ass off on this website lol and put in mad hours bro. I think once I fix the db issues voyager may install properly but technically I never ran the voyager:install because I ran artisan migrate and the storage link was already created and files were already published from voyager on the server. I will let you know. I can fix this. I have not ran npm run dev && npm run prod because one that is not the command and two what is there is to compile, I have not changed the styling in weeks lol. The styling did change on the homepage and the menu is now covered by the blue floating bar when I had moved it lower when it was on the server. I imagine running npm run dev it will recompile my custom styling file I have.

I ran

composer install && npm install

Also ran

php artisan migrate
php artisan db:seed

Wave itself works just fine. It is just voyager. Of course I need to add back my stores and categories but that shit is easy lol and done via a form on the front end.

kaprinkey1

Dec 29th, 2023 01:11 PM

I was right, running npm run dev brought back my styling. Um, thank you anyway? lol. You could still help me with the voyager issue and it resetting anytime I move the files?

Sitting here typing out the problem, lead me to finding the problem LOL.

Screenshot (756).png


I also renamed the migration files for my custom tables so the migrations are ran because when I ran php artisan migrate intentionally they were not ran bc of their date which is like 2 months ago lol.

kaprinkey1

Jan 5th, 2024 08:12 AM

I marked this complete because it never received a reply. Not to mention I got it working again except for Voyager. I thought DevDojo took over Voyager from TCG?

Long story short, when I move the code to my computer from my server because we were replacing hosting companies. When the codes moved and you run npm run dev && PHP artistan migrate && composer install, it installs laravel and the laravel application starts working, Voyager does not and I'll even run PHP artisan Voyager:install and it runs the migration files for Voyager but it doesn't create the permissions table and there's a migration there file for it. The only way I have been able to combat that is to take the DB for my server and copy and paste the tables using SQL code but I still need to make a user with Voyager and when I do, it throws an error about the permissions table that doesn't exist.

Of course I can get the permissions table from the other DB server but I don't think that is the proper procesa or that Laravel/Voyager should be doing this. Why aren't the migration files being ran for Voyager?

I am using laravel wave. It is in regards to my shop4chartities.

bobbyiliev

Jan 6th, 2024 09:30 AM

Hi there,

I've not really seen that issue before, and I've not been able to replicate it with a fresh new Wave install.

To further troubleshoot this can you:

  • Share the full error that you are getting?
  • Also, what is the voyager version that you have defined in your composer.json file?
  • And have you made any changes to permissions table migration file?
kaprinkey1

Jan 6th, 2024 12:03 PM

Hey Bobby. I just got up and drinking my coffee but yes I will send it very soon.

I can tell you right now I have not touched the permissions table. I don't need it for this website technically but I do need Voyager so my less technically inclined business partner can add publishers without needing to use a form. I set up the bread for my tables. I do have a form set up that I use to upload publishers but my partner wants a dashboard.

Let me get on my computer and I'll post the error message. On my phone drinking coffee.

kaprinkey1

Jan 6th, 2024 12:31 PM

Ok, I am on my computer now. I just ran npm install && npm run dev and this is what happened, in the screenshot below. It reset Voyager entirely.

Did you notice that the voyager menu has no icons nor do the images work? I did nothing to voyager other than adding bread to my tables. Then when I finally do get into Voyager, message appears. All of this happened after running the above commands.

Mind you, the announcement table exists and there are even announcements present and I am using the default [email protected] user? I do not understand this?

I also just noticed that my settings in voyager admin remained the same but is not being applied to the front end?

I got the images in voyager back when I ran composer install but this announcement issue I am not sure about. I forgot that I exported/imported the permissions table from my servers db so that issue has dissipated and now I am dealing with this announcements issue again. It did this last time and I cannot remember how I fixed it and it has brought down my entire site except voyager?

On top of that, I have an entire section in the media manager that Voyager does not recognize. Everytime I try to change my icons or website icons I get an error telling me the file cannot be found? I am uploading it from my computer lol when it does this. Yet I can visit the files in my media manager in a browser? None of the issues arose until I moved the code and then it just broke voyager. Getting Wave back was fairly easy to be honest. Tony did it right by using Laravel with their migration files. It makes it so much easier to just run a migration command as opposed to downloading a SQL file and then importing it into another db. When we were using UmbracoCMS we literally had to write DB services so that we could grab the data on the front end. Laravel cuts all of that out.

Screenshot (835).png Screenshot (834).png

Screenshot (833).png Screenshot (831).png Screenshot (832).png Screenshot (836).png

Below is my composer.json but the version is:"tcg/voyager": "1.5.x-dev",

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^8.2.0",
        "ext-exif": "*",
        "ext-gd": "*",
        "ext-redis": "*",
        "devdojo/app": "0.11.0",
        "devdojo/tails": "^1.1",
        "devdojo/themes": "0.0.7",
        "doctrine/dbal": "^2.13",
        "guzzlehttp/guzzle": "^7.6",
        "intervention/image": "^2.7",
        "lab404/laravel-impersonate": "^1.7",
        "laravel/framework": "^9.11",
        "laravel/sanctum": "^3.3",
        "laravel/tinker": "^2.7",
        "laravelcollective/html": "^6.4",
        "laravelir/pwa": "^0.1.8",
        "league/csv": "^9.0",
        "livewire/livewire": "^2.12",
        "nesbot/carbon": "^2.71",
        "pusher/pusher-php-server": "^7.2",
        "spatie/laravel-sitemap": "^6.3",
        "spatie/laravel-tags": "^4.5",
        "symfony/translation": "^6.3",
        "tcg/voyager": "1.5.x-dev",
        "tymon/jwt-auth": "@dev"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/dusk": "^6.0",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.1",
        "pestphp/pest": "^1.21",
        "pestphp/pest-plugin-laravel": "^1.2",
        "phpunit/phpunit": "^9.5.10",
        "spatie/laravel-ignition": "^1.0"

    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/",
            "Wave\\": "wave/src/",
			"Spatie\\Sitemap\\": "vendor/spatie/laravel-sitemap/src"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [],
            "providers" : [
                "Wave\\WaveServiceProvider"
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover",
            "@php artisan storage:link"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true,
        "allow-plugins": {
            "pestphp/pest-plugin": true
        }
    },
    "repositories": {
        "hooks": {
            "type": "composer",
            "url": "https://larapack.io"
        }
    }
}

So, I tried making a new user via:

   $user = new App\Models\User;
   $user->name = 'Your Name';
   $user->username = 'kprinkey';
   $user->email = '[email protected]';
   $user->password = bcrypt('your_plain_text_password');
   $user->save();

It throw the same user announcement error? I also upgrading voyager to 1.6 and it is still doing this? Every action I attempt to take in Voyager results in the error where it says it cannot find the file?

I could not find an exact error for this issue. The last production error in the logs was back in OCT.

When I attempt to reinstall voyager, because clearly something is wrong, I get the error below and looks as though the roles are not being seeding properly and that is probably because the roles already exist and so does the table.

Screenshot (837).png

kaprinkey1

Jan 7th, 2024 01:35 PM

Update: I got the homepage back to normal. I realized it was reset when Voyager reset. The issue I have not yet resolved is the error below about user announcements. There were announcements present in voyager. If I logout of the account, naturally the error dissipates.

The other error is whenever I try to use an image in voyager, it tells me file not found? I could potentially fix the image error by hard coding the image but I really wanted to use Voyager so my business partner can interact with the website on his own via Voyager.

Screenshot (840).png Screenshot (841).png

bobbyiliev

Jan 8th, 2024 01:25 AM

The announcements error indicates that the hasAnnouncements() method is not available. Have you made any changes to the wave/src/User.php file or the app/Models/User.php files?

The method is defined here: wave/src/User.php#L136-L143.

If you've changed the app/Models/User.php and no longer include the Wave\User namespace that could also explain why you get that error.

The unable to find file error is a pretty odd one as it does not really give any information on what is going on. Does this happen when you try to upload a file? Does it only happen in the theme settings or for all file uplodas via Voyager?

kaprinkey1

Jan 8th, 2024 10:37 AM

I got wave back. I guess I did change the user model to extend Voyagers user model and not Authenticatable. I cannot remember why I changed it, but clearly I did and now I am concerned with why I changed it but doesn't seem to affect anything lol.

I am still however getting the file input() error and this happens when I try to upload anywhere in Voyager.

kaprinkey1

Jan 8th, 2024 11:49 AM

You will not be able to replicate the issue unless you have my source code because I did alter some things when I tied my stores and categories into the application as I registered my own routes. I am not sure why the input error is occuring but I am close to hard coding it because the rest of voyager works just fine lol.

Update: I just noticed I had to make the bread for my stores and categories table again. Not sure if that is meant to happen?

bobbyiliev

Jan 9th, 2024 03:19 AM

Good to hear that you've got Wave back up and running now.

About the file upload, have you checked your file permissions? The web server service might not have the necessary permissions to read or write to the directory where the files are being uploaded. Check the permissions of the storage directories eg storage/app/public and ensure that your web server has read and write permissions:

sudo chown -R www-data:www-data /path/to/laravel-project/storage/app/public

Change the /path/to/laravel-project with the actual path to your app and then try again.

kaprinkey1

Jan 13th, 2024 02:40 PM

I will check the permissions.

It's odd though, I do not remember changing the user model and the file from the server before I transferred to my laptop, never had the altered user model and extended authenticable like it should.

I did run Voyager install bc it was not working. Maybe that changed the user model upon install, IDK lol.

I am using laragon btw and none of the other laravel sites do this when I attempt to access voyager.

Update: I just made sure the permissions were right and they are. The laragon server never had issues before but I made sure it was not that.

kaprinkey1

Jan 14th, 2024 01:23 PM

So I checked the permissions and they are present.

I attempted to hard code the favicon and homepage logo but it is not showing up on the front end? I hard coded using images stored in voyagers media manager. However, I got the homepage promo image working and it's from the same media manager.

bobbyiliev

Jan 16th, 2024 01:27 AM

Just to clarify, what is the currently open issue that you are still seeing? Is it only with the Voyager uploads?

Regarding the permissions on your Laragon server, it is not really related to the live server, file permissions do not get transferred over once you copy your files from your local PC to the actual server.

Do you see any errors in the Laravel logs? Or the web server logs at /var/logs?

If it is only the file uploads problem, then it sounds like a server configuration problem rather than Wave issue as things are working fine on your local setup right?

kaprinkey1

Jan 17th, 2024 02:35 PM

Hey Bobby,

Yes every time I attempt to set a site image via the themes section in voyager it gives me file not found error and also in settings. I cannot even set the voyager icon or loading icon. Therefore, I hard coded the images in the app and header.blade.php files. They are there now. This site will not change much except the stores, categories, and products. They are dynamically retrieved using eloquent models and I did not really need the media manager as much as I needed the bread operations and those work just fine ironically enough and so does the dashboard which shows all the advertisers listed for my partner. That is all I was concerned about and it seems that functionality was not affected by the code move. Rest of Voyager works just fine

Load More Answers