Page MenuHomePhabricator

Remove hard-coding of URLs
Closed, ResolvedPublic

Description

It seems there are a number of links that still point to twl-test instead of wikipedialibrary. One example is in the emails sent to users - <noreply@twl-test.wmflabs.org> is used. This should be updated to noreply@wikipedialibrary.wmflabs.org.

Another example is on a partner page in /admin/partners, the 'View on site' button links back to twl-test instead of wikipedialibrary.

We should go through the code and make sure that there are no remaining links to twl-test.

Event Timeline

Samwalton9-WMF renamed this task from Update emails to point to the new URL to Update all references to twl-test to wikipedialibrary.Apr 5 2017, 10:24 AM
Samwalton9-WMF updated the task description. (Show Details)

Hardcoded hostnames make testing very annoying too, since the URLs don't always stick to the correct environment (eg, vagrant, staging, etc). I'll go ahead and clean this up sooner rather than later, because it will make other work go more smoothly.

Samwalton9-WMF renamed this task from Update all references to twl-test to wikipedialibrary to Remove hard-coding of URLs.Apr 14 2017, 6:43 PM

I *believe* we have this resolved.

View on site button still doesn't work, under certain circumstances, despite twl-test not being in the code anymore. Likely stored in DB somewhere.

Okay, it looks like admin site doesn't pick up the variables in production_settings.py, it's still using the production.py defaults.

@Samwalton9 Turns out it *was* a value in the database. The TWL "Site" in django admin was configured as twl-test. I updated that and restarted the app server, and things are looking peachy. Please verify.

There's still an issue with the email - it's still coming from noreply@twl-test.wmflabs.org (see https://wikipedialibrary.wmflabs.org/admin/djmail/message/).

Hmm, yeah I should have addressed this in this issue. The email and URL issues have very different things underpinning them, and those changes are harder to test. Is there a good workflow for me to trigger a message to myself or @Samwalton9 via the website? I would do this on staging first since mucking up email on test would break emails from the live website.

@Samwalton9 I was being dense on this one. Changed the value in staging and applied for a resource, then approved it. It's looking good. Going to apply the change to prod this evening.

Fix pushed, please verify that emails are looking happy @Samwalton9 .

An email was sent today, and from the correct address!