Hi Markus,
I suspect that updating the Vagrant environment should resolve these issues. When installed, the Vagrant environment will set up AtoM based on how it was when the development environment was first created - but a number of configuration changes, features, and bug fixes have been added to our development branch since we first created that environment. I would recommend you try the following steps to upgrade your environment.
First, if you have made any local code changes that you wish to preserve, I would recommend that you try using
git stash to stash them away, so we can pull in the attest changes. Be aware that if you have made local code changes, there could be conflicts (depending on the changes) after updating and trying to unstash them that you will have to resolve.
Additionally, if you have any data that you want to keep in your development environment, you should make a backup. See:
In the Vagrant box, if you want to create a backup called backup.sql to the directory where you installed the Vagrant box on your host computer, you can use:
- mysqldump -u atom-user -pATOMPASSWORD atom > /vagrant/backup.sql
Now we'll go through some of the steps usually used during
Upgrades. Just to be sure, let's run the purge command -
this will purge all data from the database, so make sure you have backed up any data you want to keep! We'll use the --demo option - if you have backed up data, it will be overwritten with your existing data and user accounts when we load it back in later so it won't matter. From AtoM's root directory inside the vagrant box (/home/vagrant/atom), which is a symlink for /usr/share/nginx/atom), run:
- php symfony tools:purge --demo
Let's make sure we are reset to the latest HEAD in git, then pull in the latest code changes now:
- git reset --hard HEAD
- git pull --rebase
We will now drop and recreate the database:
- mysql -u atom-user -pATOMPASSWORD -e 'DROP DATABASE atom; CREATE DATABASE atom CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;'
Now we can load back in any backed up data if you have it:
- mysqldump -u atom-user -pATOMPASSWORD atom < /vagrant/backup.sql
Run the upgrade task:
- php symfony tools:upgrade-sql -B
Clear the application cache and restart services:
- php symfony cc
- sudo systemctl restart php7.4-fpm
- sudo systemctl restart memcached
- sudo systemctl reload nginx
- sudo systemctl reset-failed atom-worker
- sudo systemctl restart atom-worker
Re-index the site:
- php symfony search:populate
Hopefully this should resolve the issue you've encountered! Let us know how it goes.
Also, if you didn't have any data to load, try the following credentials to log in as an administrator:
And if those don't work, you can create a new administrator account via the command line, with:
You can now also unstash any local code customizations.
Cheers,