Skip to content

Fix/fresh install errors - #5

Merged
IamPrime merged 3 commits into
masterfrom
fix/fresh-install-errors
Oct 20, 2026
Merged

IamPrime merged 3 commits into
masterfrom
fix/fresh-install-errors

Conversation

@IamPrime

Copy link
Copy Markdown
Collaborator

Description

A fresh install throws errors as soon as you log in. This fixes three of them, one commit each:

  • Pages: the seeded home page had no timestamps, so the logged-in view crashed. It now gets timestamps, and the views no longer assume they exist.
  • Orders: the datetimenotified and deniedreason migrations had their table check inverted, so the columns were never added.
  • History: Module::isEnabled('courses') throws when the module isn't installed. It's now guarded with Module::find(), the same way ContactReports does it.

Related Issue

None. Found while setting up a fresh local install with the Docker setup.

Motivation and Context

Without these, a new install hits errors on /, /account/orders and /account/history right after login.

Heads up: existing installs already have those two Orders migrations marked as run, so they'll need to re-run them by hand. Happy to add a follow-up migration that handles this instead.

How Has This Been Tested?

Fresh Docker install (PHP 8.2, Laravel 10, MySQL 8). Reproduced each error on master and confirmed it's gone on this branch. The admin pages still load. phpunit results are the same as master; the 22 Messages API failures were already there.

The seeded home page was inserted without created_at/updated_at, so
viewing it while logged in threw "Call to a member function
toDateTimeString() on null". Seed the timestamps and guard the site
views against null dates.
The datetimenotified and deniedreason migrations only ran when the
table did NOT exist, so the columns were never added and order pages
failed with "Unknown column". Existing installs that already recorded
these migrations will need them re-run.
Module::isEnabled() throws when a module is not installed. The courses
module was removed from the public repo, so /account/history failed
with "Module [courses] does not exist".
@IamPrime
IamPrime merged commit 4588ac3 into master Oct 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant