Site admin functions redirecting to localhost rather than domain name+issues

Since migrating patterns.transitionresearchnetwork.org from Cldstr to our own server, redirects following attempts to add new users attempt to go to cards within http://localhost:3000/rather than the base URL. The system creates a card with the assigned name, but the card type is Basic rather than User: no account is created and no invitation email sent.

 

The same thing happens when I delete a card - though the card does get deleted.

 

Following the instructions on http://wagn.org/Special_Urls_and_Ports, we've created config/wagn.rb (which didn't seem to be there), but this didn't solve the problem.

 

There is more detailed information at https://trac.transitionnetwork.org/trac/ticket/665