Fantasy-Calendar
Fantasy-Calendar copied to clipboard
[BUG] Attempt to read property "id" on null
Link to your calendar Not that far yet.
Describe the bug
I have spun up a development server with docker by cloning the repo. I edited the .env
file to point the URLs to the LAN IP address for my server as I am running it on a headless home server (e.g. APPURL=http://<lan-ip>:9980/
). I ran make
(actually had to run it twice as it errored out the first time when trying to setup the database) and docker-compose up -d
to get a server running. Once running, I visit from the browser on my desktop and while attempting to create a new account I get the error Attempt to read property "id" on null
upon submission. It seems like the database doesn't contain the Agreement maybe? It shows the error on line 84 of RegisterController.php.
To Reproduce Steps to reproduce the behavior:
- Go to the home page.
- Click on 'Register' at the top right
- Enter the details, accept the T&C and Privacy Policy, and click 'Register'
- See error
Expected behavior Successfully create an account as it does on the live website.
Screenshots Not sure what I could screenshot, but will take any requested.
Desktop (please complete the following information):
- Browsers: Firefox, MS Edge, Google Chrome
- Versions: 100.0.2, 102.0.1245.30, 102.0.5005.61
Additional context I'm still fairly new the working with Docker, so I apologize if this is something I missed somewhere, but I did try reading through the README and existing issues to no avail. Am I supposed to be using a default login instead of creating a new one? Many thanks for any help and this fantastic tool!
Also have now tried with a local install on my desktop and still get the same error.
I think the issue might be that the mysql-schema.dump
is creating the agreements
table and the corresponding migration, but does not in fact create an agreements
dataset. The migration will then be skipped.
One workaround is to manually roll back and re-apply the migrations after running initialize_dev
:
docker-compose exec php php artisan migrate:refresh
This might break something else though :shrug: