unicef / iogt

BSD 2-Clause "Simplified" License
25 stars 35 forks source link

After posting comment, user is directed to an old domain for the site #1643

Closed cbunicef closed 10 months ago

cbunicef commented 1 year ago

Example, after publishing a comment on za.goodinternet.org a user is redirected to a za.iogt.site URL.

The comment publishes succesfully.

istride commented 10 months ago

This happens due to there being two different concepts of a 'site' - one for Django and the other for Wagtail. The commenting features are, in part, provided by a Django-specific module that seems to use the Django site model.

It is possible that when an IoGT site is first created, it will use a temporary initial host name which is changed before the site goes live. Changing the site host name in the Wagtail admin does not change Django's idea of a site, so it must be changed separately via the Django admin UI (at /django-admin/). After synchronising the site name across Django and Wagtail, this issue should not occur.

I have verified that it is not occurring any more on za.goodinternet.org.