Disqus

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: Disqus

Postby hansfn » Wed Jun 20, 2012 9:30 pm

Well, if entry 22 actually was created (on Disqus) by the exporter, you should try to find out what is different in that entry. (If you use a flatfile database, you can look at the entries through the Media explorer or if you use MySQL use PHPMyAdmin or similar tools.) If you find the difference, maybe related to a link/URL field, I might be able to help you.

No, the exporter doesn't create a (WXR) export file. It uses the API directly. The code isn't that difficult to read ... Look at the function _pt_export_comments2disqus in the file extensions/pivotx_tools/lib.php.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Disqus

Postby Lxndr » Wed Jun 20, 2012 10:36 pm

It was, indeed, created (on Disqus) by the exporter.

I've got flat files, so yay for that.

Okay so here's what I'm noticing:

the one that is able to be exported wrote:[comments] => Array
(
[0] => Array
(
[name] => Jo Michaels
[email] => yassbook2012@gmail.com
[url] => http://jomichaels.blogspot.com
[ip] => 74.176.184.75
[useragent] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
[date] => 2012-06-19-13-47
[comment] => And this is when you hire someone to do your marketing FOR you. There was an interesting post today on Rachelle Gardner's blog about this exact thing: http://www.rachellegardner.com/2012/06/ ... -building/ You should pop over to her blog and have a gander. She speaks quite forcefully about writers being WRITERS. :) WRITE ON!
[registered] => 0
[notify] => 0
[discreet] => 1
[rememberinfo] => 1
[moderate] =>
[spamscore] => 0
)

)


one that doesn't work wrote:
[comments] => Array
(
[0] => Array
(
[name] => Jo Michaels
[email] => yassbook2012@gmail.com
[url] => http://jomichaels.blogspot.com
[ip] => 74.176.184.75
[useragent] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
[date] => 2012-06-19-13-48
[comment] => I think getting into the hands of that ONE reader, who will tell ten people, who will tell ten people, and so on and so forth is what we all crave. Really good reviews don't hurt, either :) WRITE ON!
[registered] => 0
[notify] => 0
[discreet] => 1
[rememberinfo] => 1
[moderate] =>
[spamscore] => 0
)


Now, apart from the different dates, and the different words in the comment, everything else looks identical.

And yet the top one exports, and the bottom one does not. (Others also look similar, but this one which was posted just one minute AFTER the functioning one, I think is the best case to analyze.

the only thing that looks different is that the top one has an actual URL in its "[comment]" so I tried adding a URL to the bottom one, and it still failed.

I must admit, I am baffled.


Thanks for trying, despite not having time.
Lxndr
 
Posts: 32
Joined: Mon Jun 04, 2012 2:27 am

Re: Disqus

Postby Lxndr » Wed Jun 20, 2012 10:49 pm

More in baffling news: Looks like my latest test (which only edited the entry #21) somehow managed to get comments for entries 2-6 to export. I did not touch any of those entries.

Just tried it again, and 2-6 are going through, as is 22. Meanwhile, 7-21 are not going through, nor is 23. (1 has no comments)

I remain perplexed. Maybe if I run the exporter enough it will work for all the entries?
Lxndr
 
Posts: 32
Joined: Mon Jun 04, 2012 2:27 am

Re: Disqus

Postby hansfn » Wed Jun 20, 2012 10:50 pm

The problem isn't in the comments part of the entries - it's the entries themselves you should compare. (The exporter tries to creates a thread in Disqus for each entry. The error was "Failed to update the (url field for) thread ...")
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Disqus

Postby Lxndr » Wed Jun 20, 2012 10:54 pm

hansfn wrote:The problem isn't in the comments part of the entries - it's the entries themselves you should compare. (The exporter tries to creates a thread in Disqus for each entry. The error was "Failed to update the (url field for) thread ...")


But everything else is identical between those two comments I quoted earlier. Am I wrong?

And now 2-6 are also working. I'll have to investigate why that is happening later.
Lxndr
 
Posts: 32
Joined: Mon Jun 04, 2012 2:27 am

Re: Disqus

Postby hansfn » Wed Jun 20, 2012 11:03 pm

Did you read what I wrote? The error is related to the creation of the thread (which contains the comments). Forget about the comments - look at the entries.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Disqus

Postby Lxndr » Thu Jun 21, 2012 9:12 pm

hansfn wrote:Did you read what I wrote? The error is related to the creation of the thread (which contains the comments). Forget about the comments - look at the entries.


Aha! The entire .php file?

Okay, the entries also look identical, apart from the dates/times, and the body/comment text. I remain perplexed.
Lxndr
 
Posts: 32
Joined: Mon Jun 04, 2012 2:27 am

Re: Disqus

Postby hansfn » Fri Jun 22, 2012 9:06 am

OK.

I have one final suggestion - run the export as slow as possible ... In the advance configuration (in PivotX) add "pivotx_tools_chunksize" with value 1. (The default is 10.) See if it helps.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Disqus

Postby Lxndr » Fri Jun 22, 2012 2:15 pm

hansfn wrote:OK.

I have one final suggestion - run the export as slow as possible ... In the advance configuration (in PivotX) add "pivotx_tools_chunksize" with value 1. (The default is 10.) See if it helps.


aha! this worked!

...except, weirdly enough, for the very last entry, which I made yesterday evening, and which didn't get any comments until after I went to sleep.

Dunno what's up with that one, but I don't mind losing ONE comment. Before, it was many many comments.
Lxndr
 
Posts: 32
Joined: Mon Jun 04, 2012 2:27 am

Re: Disqus

Postby livewire » Wed May 29, 2013 1:03 am

Can I ask, I want to replace the standard comment count code with the Disqus code, where do I do that? I have added the main Disqus code just fine.
livewire
 
Posts: 4
Joined: Tue May 28, 2013 1:39 pm

PreviousNext

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 2 guests

cron