Open mhl opened 6 years ago
I've done steps 1 to 3 - now we have to wait up to 24 hours for the URL migration to take place, apparently. However, step 1 seemed to work fine - now there's a single comment thread for all subpages of a person, which means we can close a historic older bug: #1617
Step 4 appears to be difficult unfortunately - when setting this.page.identifier
as well as the URL with this.page.url
, it no longer finds the existing comment thread. This is not what Disqus suggested here: https://github.com/mysociety/pombola/issues/421#issuecomment-10750512 - but in email correspondence @evdb mentioned the same thing that I've found - it doesn't work.
I'll email Disqus support to ask / complain about this, since it would still be good to use identifiers rather than URLs for comment threads (since slugs can change), but it's unclear how you can migrate.
I haven't had time to ask Disqus about this (i.e. "How do you actual migrate from using this.page.url to this.page.identifier without losing the comments?") - that would be good to follow up on. Another question is "If you're identifying threads by this.page.identifier, is there any way to merge them?"
Once that's resolved, it would be good to create a ticket for getting core_merge_people
to also help you in some way to merge Disqus threads.
A thing to ask Disqus about before that, however, is an example I gave in Slack of a comment that appeared to have been lost in the merge (not quoted here, but search for "my admission to the university" in Slack to find it).
There is previous history of this problem here: #421, but the changes discussed there were then backed out by 6f20b37edd7b993010699e8d52f2a2d79232b228 - I don't think this was ever revisited after that.
I think our ultimate goal should be what was originally intended - generate a stable identifier for each object which the disqus thread is chosen from. The relevant disqus documentation is here:
I suggest a plan with multiple stages:
this.page.url
(in thedisqus_config
function) to the main page URL for the object. (That includes, say:http://info.mzalendo.com/hansard/person/aaron-cheruiyot/appearances/?page=11
which should setthis.page.url
tohttp://info.mzalendo.com/person/aaron-cheruiyot/
.)this.page.identifier
in thedisqus_config
function as well. We'd like to move to using more stable identifiers; it'll be easier to maintain in the longer run. These can be the same as how the code used to generatedisqus_identifier
previously. Warning: I assume that Disqus will then start associating that ID with the thread as well as the URL, so we can later remove thethis.page.url
but we'll need to carefully check that. I'd suggest settingthis.page.identifier
just for one page initially, to check that it's still showing comments, and similarly see that it's still showing comments after removingthis.page.url
.