Recent Topics

1 Apr 11, 2008 00:57    

Just came a across a weird thing,
Doing some test posts and comments to see how my layout works out, I made a test post and then tried adding a comment to the post via the backoffice.
I could type in the comment and click submit but then the allow comments plugin kicks in and comes up with the error text I had setup because I hadn't entered the text in the antispam field.

Well this is the problem:
There is no antispam field in the comments area of the backoffice.
I am setup to be able to bypass the chor because I am a registered member etc.

Any ideas how I could add plugin compatibility within the backoffice?

2 Apr 11, 2008 01:03

I moved this because it's not really related to what it was part of, and I moved it to "bugs" because I think it might be a bug. MAYBE!

I noticed the other day that TuringTest antispam plugin rejects a comment made via the back office. TuringTest uses ... whatever the hook is to provide an extra text field to commenters that they have to put the proper text into in order for their comment to succeed. The field does not exist in the back office, so of course one can not add the proper text.

So somehow for some reason the text field is not available when commenting from the back office, but the contents of that field are expected when posting the comment. I have not looked at why yet. It might be that there is a new hook that the plugin needs to take advantage of yah? But it also might be that an existing hook was not put into the back office admin page?

Anyway I moved this and add my two pence because it got noticed by someone other than me.

3 Apr 11, 2008 02:09

Okay it's a bug.

In items/views/_item_list_full.view.php we have the ability to comment, which passes the comment to htsrv/comment_post.php but does not have the "DisplayCommentFormFieldset" hook in it. I tried adding it and got yelled at for Plugins not being known. So I tried adding "global $Plugins;" and got yelled at for doing it to a non-object.

In any case, htsrv/comment_post.php looks to "BeforeCommentFormInsert" for any additional processing that may happen which of course rejects the comment because the answer was not provided with the form submission.

I suppose I could change the plugin to somehow figure out if the comment is coming from admin.php?ctrl=items and then assume permission to comment without the proper answer, but it seems to me this is a bug that needs real resolution rather than a temporary corrective action in any plugin that uses both DisplayCommentFormFieldset and BeforeCommentFormInsert to do it's thing.

4 Apr 11, 2008 05:44

Wow, thanks for the detailed explaination and investigation, you were right of course to move it, I got my plugins all in a twist, I was thinking that your turingtest field was part of the allow comments plugin for some reason - doh.
Sounds like a tricky thing to resolve.


Form is loading...