❓ Support
E Emmanuel71 Jan 29, 2024

Laravel 10 install problem

Hi,

I'm trying to install Waterhole in my local Laravel 10 / Filament project. I have double checked and think I followed all the installation steps. However, when I first login at the site login page, and then try to navigate to localhost/forum for the first time, I get following screen:

waterhole.png

When I click 'create account', it creates the account in the waterhole user table and then the create account dialog persists but showing (and logging in) the next user in the laravel user table.

Am I doing something wrong or did I forget something during setup?

I would expect waterhole to create the user in the wh user table and then forward to the homepage of the forum. However, after logging out and back in, i am redirected to the forum homepage. But then, unfortunately I get all sorts of errors:
I can't save when creating a post ('something went wrong' message)
After trying to create a post and wanting to go back to the forum homepage I get: "The attribute [ignored_at] either does not exist or was not retrieved for model [Waterhole\Models\PostUser]."

Answered by Toby Toby

Glad to hear you got it working @Emmanuel71! I've created an issue to track Model::shouldBeStrict() compatibility. I've also released 0.4.5 which should hopefully fix these issues with using the incorrect database connection. Please try it out and let me know if there any further issues that persist!

View Answer

⁨7⁩ ⁨Comments⁩

Hi,
Thanks for the quick reply. I upgraded to 0.4.4. I still get the 'create account' window when a user goes to /forum the first time. But maybe this is the expected behaviour? Auto create of the user would be awesome however.

After creating the user by clicking 'create user', I'm redirected to the forum homepage now. But still can't add posts: the form does not appear.

wh1.png
wh2.png

In reply to E Emmanuel71

Hi,

I have some more clues considering my most recent post:

I can't access the /cp route because I don't have an admin user (403 error)
There is almost no data in the database, also not in the groups and channels tables.

Can I solve this manually or is there some procedure to follow that I might have missed?

Thanks

In reply to E Emmanuel71

dumped all tables in the waterhole db and then re-ran

php artisan migrate:fresh --seed
php artisan waterhole:install

Must not have paid enough attention the first time when creating the admin user. All test work now so far. Notice though, I had "Model::shouldBeStrict()" on in my AppServiceProvider. It produces an error because some field was not found when I tried to add a post. Had to disable this and then it worked.

At first sight, this package seems awesome! I will continue my local testing and then maybe purchase a license!

Just finished testing most features. I think it's really great, but I also think I might have discovered a few remaining bugs.

Global search does not work for me and neither does creating channels. Both functions search in the 'main' database of the laravel app instead of in the waterhole db. I think it's just a matter of using the wrong db connection in the codebase, or maybe some setting I forgot to make?

global search throws:

[previous exception] [object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'maindb.comments' doesn't exist at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:416)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(416): PDO->prepare()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(809): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(776): Illuminate\\Database\\Connection->runQueryCallback()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(407): Illuminate\\Database\\Connection->run()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2751): Illuminate\\Database\\Connection->select()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2740): Illuminate\\Database\\Query\\Builder->runSelect()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3294): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2739): Illuminate\\Database\\Query\\Builder->onceWithColumns()
#8 /var/www/html/vendor/waterhole/core/src/Search/MySqlEngine.php(121): Illuminate\\Database\\Query\\Builder->get()
#9 /var/www/html/vendor/waterhole/core/src/Search/Searcher.php(22): Waterhole\\Search\\MySqlEngine->search()
#10 /var/www/html/vendor/waterhole/core/src/Http/Controllers/Forum/SearchController.php(44): Waterhole\\Search\\Searcher->search()

creating a channel in the control panel throws:

[previous exception] [object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'maindb.taxonomies' doesn't exist at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:416)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(416): PDO->prepare()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(809): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(776): Illuminate\\Database\\Connection->runQueryCallback()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(407): Illuminate\\Database\\Connection->run()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2751): Illuminate\\Database\\Connection->select()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2740): Illuminate\\Database\\Query\\Builder->runSelect()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3294): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2739): Illuminate\\Database\\Query\\Builder->onceWithColumns()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3221): Illuminate\\Database\\Query\\Builder->get()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3149): Illuminate\\Database\\Query\\Builder->aggregate()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php(54): Illuminate\\Database\\Query\\Builder->count()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php(903): Illuminate\\Validation\\DatabasePresenceVerifier->getCount()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php(874): Illuminate\\Validation\\Validator->getExistCount()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(657): Illuminate\\Validation\\Validator->validateExists()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(457): Illuminate\\Validation\\Validator->validateAttribute()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(492): Illuminate\\Validation\\Validator->passes()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(534): Illuminate\\Validation\\Validator->fails()
#17 /var/www/html/vendor/waterhole/core/src/Forms/Form.php(45): Illuminate\\Validation\\Validator->validate()
#18 /var/www/html/vendor/waterhole/core/src/Forms/Form.php(25): Waterhole\\Forms\\Form->validate()
#19 /var/www/html/vendor/waterhole/core/src/Http/Controllers/Cp/ChannelController.php(26): Waterhole\\Forms\\Form->submit()
#20 /
Answer
Toby Toby Waterhole Founder Jan 31, 2024
In reply to E Emmanuel71

Glad to hear you got it working @Emmanuel71! I've created an issue to track Model::shouldBeStrict() compatibility. I've also released 0.4.5 which should hopefully fix these issues with using the incorrect database connection. Please try it out and let me know if there any further issues that persist!

In reply to Toby Toby

Thanks for the quick reply, creating the issue, and the fixes! Everything seems to work well now. I really want to congratulate you on this tool. It looks beautiful and has all the basic functionality and more. Really nice work!

This will be the perfect tool for a new project I'm starting. Phase one is creating a forum and should be delivered by the end of February. I will purchase a license and if ok, I'd like to contribute for the translation to dutch.

I think I also noticed a few small issues with the html editor. I'll have a look at it again to make sure and will post in a new thread if necessary.