New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No comments inserted when importing from Disqus #135

Closed
pvorb opened this Issue Nov 12, 2014 · 10 comments

Comments

Projects
None yet
2 participants
@pvorb

pvorb commented Nov 12, 2014

isso -c /etc/isso.conf import comments.xml runs without any error but no comments are added to the database. I checked the sqlite comments db. The tables are available, but there are no comments.

@posativ

This comment has been minimized.

Owner

posativ commented Nov 12, 2014

I'll need the XML file to check what's failing there. Can you clean the file (remove IP addresses, email addresses) and sent me the file (info@posativ.org).

@pvorb

This comment has been minimized.

pvorb commented Nov 12, 2014

I sent you the file. Thanks.

@pvorb

This comment has been minimized.

pvorb commented Nov 12, 2014

I started to have a look at the code in migrate.py. What I did not notice before was that the first line of the output said there were 222 orphans. After that, all comments are printed in full, which is why I didn't notice the first line.

So without any error doesn't mean that there is no output.

I'll try to dig deeper...

@posativ

This comment has been minimized.

Owner

posativ commented Nov 12, 2014

This is really odd. I have seen like three Disqus exports so far and built the import functionality around their structure. The reason, Isso discards all comment threads is because of the thread structure:

    <thread dsq:id="42">
        <id/>
        ...
    </thread>

Usually, it is slighty different:

    <thread dsq:id="42">
        <id>http://example.com/</id>
        ...
    </thread>

Note the <id> tag. The dump from @noqqe had a few of these threads, but all of them were really old and no longer accessible (and thus discarded).

Did you migrate your comments once, e.g. you changed your URL structure and Disqus followed all redirects? If not, can you try this?

@pvorb

This comment has been minimized.

pvorb commented Nov 12, 2014

Actually, I once migrated a handful of comments to disqus. Only about 20 or so. All other threads and comments were created in Disqus.

Also my blog moved from http://vorb.de/ to http://vorba.ch/ one year ago. Probably that's the reason.

Usually, it is slighty different:

<thread dsq:id="42">
    <id>http://example.com/</id>
    ...
</thread>

Is <id>http://example.com/</id> the domain of the blog, i.e. the same for every thread, or is it the url of the thread, just like in <link/>?

@pvorb

This comment has been minimized.

pvorb commented Nov 12, 2014

Btw: There's a Disqus help page that shows a sample export XML file which has numeric thread ids.

@posativ

This comment has been minimized.

Owner

posativ commented Nov 13, 2014

The <id> element contains the complete link (which is often the same as in the <link> element) wich is missing in your case.

Thank you for the pull request, but I can not merge it right now, because there's actually a (not really working) test case to check that empty id tags are skipped (see https://github.com/posativ/isso/blob/master/isso/tests/disqus.xml#L28-L30).

@pvorb

This comment has been minimized.

pvorb commented Nov 13, 2014

No problem. The pull request seems obsolete somehow, since <id>s normally shouldn't be empty. Probably we could ask someone at Disqus, which behavior is considered right...

@pvorb pvorb closed this Nov 18, 2014

@posativ

This comment has been minimized.

Owner

posativ commented Nov 18, 2014

I'd rather leave this issue open, I'll eventually add a flag to not skip items with an empty <id> tag, so the import works like this...

$ isso -c isso.cfg import ...
Isso coulnd't import any comments, you can try again with `--disqus-wtf`

@posativ posativ reopened this Nov 18, 2014

@pvorb

This comment has been minimized.

pvorb commented Nov 19, 2014

--disqus-wtf 😆

@posativ posativ modified the milestone: 0.10 Nov 25, 2014

@posativ posativ closed this in 89d6ea0 Dec 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment