Test & activation emails are sent with port 4000 included
The issue occurs when a Discourse database is imported from a development environment. apotry reports that test and activation links in emails include port 4000, despite no port being specified in app.yml. codinghorror suggests checking for “WARNING: DEVELOPER ONLY” settings, which are not present in this case (apotry).
The problem is caused by importing a database dump from a development environment (apotry). zogstrip suggests using the discourse remap script to fix the issue.
apotry also notices load times displayed on the left side of the screen, but zogstrip explains that this is normal for administrators in production mode.
The solution is provided by elberet, who suggests running a command to reset SiteSetting.port to an empty string. apotry confirms that this fixes the email issue.
Installed via Docker, but imported a vBulletin database from inside the development environment (using git clone … → vagrant up → vagrant ssh → ruby script/import_scripts/vbulletin.rb etc.). Inside vagrant I then took a database dump using:
pg_dump -xOf ./discourse-backup.sql -n public discourse_development
Then copied this dump to my production discourse install and did inside psql:
drop schema public cascade;
create schema public;
…
Then on the command line
sudo -u postgres psql -f /shared/discourse-backup.sql discourse
Noticed that the gravatar paths are all wrong as well. Since the vBulletin import took ~8 hours (200 000 posts), I’m reluctant to start over. Can the email-path be edited inside the database (couldn’t find anything doing a simply ‘grep’ on the dump)?
Actually also noticed that the load times (in ms) show up on the left side of the screen. Does that mean my discourse is running in development mode and not in production?
How can I change this?
codinghorror: where do I find the “WARNING: DEVELOPER ONLY” settings?
It’s only displayed for administrators, even in production.
If you search for DEVELOPER ONLY in the site settings and you have results, then you’re definitely running in development mode (we hide them when running in production mode).