FinalsClub / karmaworld

KarmaNotes.org v3.0
GNU Affero General Public License v3.0
7 stars 6 forks source link

forwarding after course creation sometimes fails #349

Closed btbonval closed 10 years ago

btbonval commented 10 years ago

Sometimes, when creating a course, instead of forwarding to https://blah/course/name, it'll forward to http://blah/course/name.

This error seems to only show up on the VM randomly. The code running on beta has not yet shown this error.

When a course is created, this line is called with Course.get_absolute_url() to return the forward URL: https://github.com/FinalsClub/karmaworld/blob/a19007eba919017445625562ab19534b7b285c76/karmaworld/apps/courses/views.py#L59-L61

Strangely, I have never seen the course list (front page) create the wrong course link, although it is using get_absolute_url(). https://github.com/FinalsClub/karmaworld/blob/1cd804f934d6d4b12ca8f43d898fe0f1e4a2b880/karmaworld/templates/courses/course_list_entry.html#L8

Here is the definition for get_absolute_url(), in case it matters. https://github.com/FinalsClub/karmaworld/blob/a19007eba919017445625562ab19534b7b285c76/karmaworld/apps/courses/models.py#L250-L252

Discussed in the commit log here: https://github.com/FinalsClub/karmaworld/commit/dda166347b2e53e9e12e7204325f120765210c7b#commitcomment-5461150

btbonval commented 10 years ago

I was the only one who ever experienced this bug. I don't really have a system to debug this on since I can't get Heroku to run KarmaNotes and there is no dev system. The good news is that I can no longer produce the problem (since I cannot actually KarmaNotes), so this ticket is moot.