Debugging for Beyond The PDF

5 views
Skip to first unread message

Peter Sefton

unread,
Dec 13, 2010, 1:02:15 AM12/13/10
to ano...@googlegroups.com, Martin Fenner
Hi all,

Martin Fenner has joined the list, and is trying to get Anotar to work
with a demo blog:
http://blogs.xartrials.org/2010/12/05/the-mycobacterium-tuberculosis-drugome-and-its-polypharmacological-implications-2/

When I try to post a comment I get this:

You are trying to reach a page that doesn't exist here. Maybe I've
moved out things or maybe you mistyped a link. Try searching:

Martin, I think the key is in these two lines in anotar-config.js (you
can edit the script via the control panel).

var action = jQ("#commentform").attr("action");

This tries to find where to post the comment to. Do you have comments
turned on - if not this is probably coming up blank. Is the form
action somewhere else?

If you do have comments on, try commenting out this line so we can
help diagnose the problem.
jQ("#respond").remove();

Peter
--
Peter Sefton
Manager, Software Research and Development Laboratory,
Australian Digital Futures Institute,
University of Southern Queensland
Toowoomba Queensland 4350 AUSTRALIA


Work: sef...@usq.edu.au
Private: p...@ptsefton.com

IM accounts:
Gmail: ptse...@gmail.com
Yahoo: peter_...@yahoo.com
MSN:  p...@ptsefton.com
AIM: ptsefton

p: +61 (0)7 4631 1640
m: +61 (0)410 326 955


USQ Website: http://www.usq.edu.au
Personal Website: http://ptsefton.com

Martin Fenner

unread,
Dec 13, 2010, 7:00:10 PM12/13/10
to ptse...@gmail.com, ano...@googlegroups.com
Peter,

Thanks for looking into this. I have commented out jQ("#respond").remove();
will have to look closer on what is wrong.

Kind regards,

Martin


Am 13.12.10 07:02 schrieb "Peter Sefton" unter <ptse...@gmail.com>:

Peter Sefton

unread,
Dec 13, 2010, 7:13:52 PM12/13/10
to Martin Fenner, ano...@googlegroups.com
Hi Martin,

Looks like there is no commenting form on the page for Anotar to fetch the 'action' URI - do you have commenting turned on?

[TODO: Make the WP plugin smarter - if it can't find the action don't try to run at all?]

Peter

Martin Fenner

unread,
Dec 13, 2010, 7:20:39 PM12/13/10
to ptse...@gmail.com, ano...@googlegroups.com
Peter,

Thanks for taking the time. I have comments turned on, see this shorter blog post:

http://blogs.xartrials.org/2010/12/13/documentation-for-blogging-beyond-the-pdf/

What is the best strategy for debugging this, Firebug?

Cheers,

Martin


Am 14.12.10 01:13 schrieb "Peter Sefton" unter <ptse...@gmail.com>:

Peter Sefton

unread,
Dec 13, 2010, 7:26:06 PM12/13/10
to Martin Fenner, ano...@googlegroups.com
Firebug might help - you can try to see if that action variable is getting set.

But note that when I go to this page:

http://blogs.xartrials.org/2010/12/13/documentation-for-blogging-beyond-the-pdf/

I don't see a comment box. Is it set to only allow comments from
logged in users?

On Tue, Dec 14, 2010 at 10:20 AM, Martin Fenner

--

Greg Pendlebury

unread,
Dec 13, 2010, 9:19:39 PM12/13/10
to ano...@googlegroups.com, Martin Fenner
Just took a quick look. I'm no expert on wordpress, but the post seems to be going to the wrong place.

Try changing:

var action = jQ("#commentform").attr("action");

To:
var action = jQ(".comment-form form").attr("action");

The skin in use has a slightly different structure to what is expected.

Hope that helps,

Greg

Peter Sefton

unread,
Dec 13, 2010, 10:07:19 PM12/13/10
to ano...@googlegroups.com, Martin Fenner
To simplify things for testing I think what you might be after is:

var action ="/wp-comments-post.php"

Martin Fenner

unread,
Dec 14, 2010, 1:09:53 AM12/14/10
to ptse...@gmail.com, ano...@googlegroups.com
Thanks for the tips. Both suggested changes didn't work. But I gave Peter
admin access to the site, maybe he finds something.

Cheers,

Martin


Am 14.12.10 04:07 schrieb "Peter Sefton" unter <ptse...@gmail.com>:

Greg Pendlebury

unread,
Dec 14, 2010, 1:34:40 AM12/14/10
to ano...@googlegroups.com
The page won't load at all for me in Firefox. It is getting hung up on a Latex plugin and some external content from other servers.

I tried on a simpler post: http://blogs.xartrials.org/2010/12/13/documentation-for-blogging-beyond-the-pdf/#p2

And the comment now gets submitted, but processing the aftereffect seems to die:

"
notes.addReplyButtons is not a function  
"
line 105 of anotar-config.js

Cynthia wong

unread,
Dec 14, 2010, 1:47:36 AM12/14/10
to ano...@googlegroups.com
That " notes.addReplyButtons " (line 106 in anotar_config.js) needs
to be removed from the code. All RCs has that bug but not the trunk.

On Tue, Dec 14, 2010 at 4:34 PM, Greg Pendlebury

Peter Sefton

unread,
Dec 14, 2010, 4:07:21 AM12/14/10
to ano...@googlegroups.com
I have made some progress.

With Cynthia's change and this: var action ="/wp-comments-post.php"
Anotar now successfully posts comments. The reason they were not
showing up before is the comment moderation - they were awaiting
moderation or in the spam trap.

The bit that is still not working is the code to put the annotations
back in line. At least one of the other plugins is interfering with
the way Anotar calculates paragraph IDs - Winerlinks - which adds
paragraph Anchors. Eventually Anotar should be able to do this using
its hashing algorithm which will be more reliable than simple
paragraph counting, but even with Winterlinks turned off we still have
problems. There are a _lot_ of plugins here though, so it might be
tough to work this one out!

At least now, if you approve comments they will be seen at the bottom
of the post and you can tell which paragraph they belong to. For now I
think it will be best to confine our testing to the paper, rather
than Martin's substantive blog posts. That is comment here:

http://blogs.xartrials.org/2010/12/05/the-mycobacterium-tuberculosis-drugome-and-its-polypharmacological-implications-2/

Peter Sefton

unread,
Dec 14, 2010, 6:06:46 AM12/14/10
to ano...@googlegroups.com
With Winerlinks turned off the IDs in the paragraphs and in the JSON
data for Anotar comments do seem to match. More work required to
figure out why the comments are not matched to paragraphs.

Here is the JSON for a comment:
{"clientVersionUri":"http://www.purl.org/anotar/client/0.1","type":"http://www.w3.org/2000/10/annotationType#Comment","title":{"uri":null},"annotates":{"uri":"http://blogs.xartrials.org/2010/12/05/the-mycobacterium-tuberculosis-drugome-and-its-polypharmacological-implications-2/","rootUri":"http://blogs.xartrials.org/?p=111","locators":[{"originalContent":"The
authors have declared that no competing interests exist. This research
is funded by National Institutes...ublish, or preparation of the
manuscript.","type":"http://www.purl.org/anotar/locator/0.1","value":"h93348027p1"}]},"creator":{"literal":"ptsefton","uri":"http://www.purl.org/anotar/ns/user/0.1#Anonymous","email":{}},"dateCreated":{"literal":"2010-12-14T18:58:58+10:00","uri":null},"dateModified":{"literal":null,"uri":null},"content":{"mimeType":"text/plain","literal":"Test
comment with winterlinks turned
off","formData":{}},"isPrivate":false,"lang":"en","id":"17"}

And the paragraph.
<p anotar-hash="h93348027p1">The authors have declared that no
competing interests exist.&nbsp;This research is funded by National
Institutes of Health grant&nbsp;<a
href="http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=Retrieve&amp;db=nucleotide&amp;dopt=GenBank&amp;list_uids=221388740"
target="pmc_ext">GM078596</a>. The funders had no role in study
design, data collection and analysis, decision to publish, or
preparation of the manuscript.</p>


The IDs match.

I will turn back on Winerlinks and look again tomorrow.

Fenner...@mh-hannover.de

unread,
Dec 14, 2010, 7:46:40 AM12/14/10
to ano...@googlegroups.com
Peter,

Thanks a lot for all this debugging work. This is really helpful, and it also shows that we have a long way to go before all this stuff can simply be installed. Having too many plugins that interfere with each other is probably one of the issues.

Cheers,

Martin

-----Ursprüngliche Nachricht-----
Von: ano...@googlegroups.com [mailto:ano...@googlegroups.com] Im Auftrag von Peter Sefton
Gesendet: Dienstag, 14. Dezember 2010 12:07
An: ano...@googlegroups.com
Betreff: Re: Debugging for Beyond The PDF

Reply all
Reply to author
Forward
0 new messages