I noticed that the url used when exporting comments using disqus_migrate was referring to /node/id rather than the alias that it had. I think there should be an option to use the alias rather than just the node/id

Comments

robloach’s picture

It uses the Node ID instead of the Node Alias so that the thread is the same no matter what the alias is. This means if you rename the node from example.com/blog/2011-11-22/mystuff to example.com/blog/2011-11-22/mynewstuff, the Disqus thread is still the same.

I agree that exporting is rather fudgy at the moment. You might want to update to the latest 6.x-1.x-dev as bkosborne has done some amazing work on it lately. You might want to hit up #298540: Add support for API version 3 in migrate module, test it out, and tell him what you think!

WeRockYourWeb.com’s picture

Only problem now is that when I create new Disqus comments, the alias is saved (not the node ID). This results in all the old, "exported" comments being saved with node ID, and new ones being saved with the alias (6.x-dev).

Looking at the export file, it seems to me that dsq:identifier could be used to hold the NID, while placing the alias in the <link> field?

We may be willing to sponsor development of this particular feature.

WeRockYourWeb.com’s picture

Okay I got this more or less working by replacing the following lines in disqus_migrate.export.inc:

replace:
'link' => url("node/" . $nid, array('absolute' => TRUE, 'alias' => TRUE))

with:
'link' => url(drupal_lookup_path('alias',"node/".$nid), array('absolute' => TRUE, 'alias' => TRUE))

There's two instances in the file. The only other cleanup is any kind of escaped markup (") that doesn't get translated on import.