Loading...
 
Skip to main content

Fatal error when using CAPTCHA Questions for comments.

Status
Closed
Subject
Fatal error when using CAPTCHA Questions for comments.
Version
14.x
Category
  • Error
Feature
Spam protection (Anti-bot CAPTCHA)
Resolution status
Fixed or Solved
Submitted by
Johnny Nielsen
Volunteered to solve
Jonny Bradley
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(1)
Description

Retested


Fixed in 15.0alpha (REV 57761)

Bug


When enabling CAPTCHA Questions, the following error is displayed below the comment entry text area, in stead of the CAPTCHA and the submit control buttons.

Fatal error: Call to undefined method Captcha_Questions::getService() in [snip tiki path]/lib/captcha/captchalib.php on line 179

It is not possible to submit a comment, since the submit button is not displayed.

The bug appears for comments in all features accepting comments.

Reproduction

Enable advanced preference filters


tiki-admin.php

Enable comments for wiki pages


tiki-admin.php?page=comments

Enable "Comments below wiki pages"

Set "Allow comments per wiki page" = "Enable (default On)"

Enable captcha questions


tiki-admin.php?page=security

Go to tab "Spam protection"

Enable "Anonymous editors must enter anti-bot code (CAPTCHA)"

Enable "CAPTCHA Questions"

Enter into "CAPTCHA Questions and answers":

q1:a1
q2:a2
q3:a3
q4:a4

Set permissions for Anonymous users


tiki-objectpermissions.php

Allow for Anonymous:

  • comments/Can post new comments (tiki_p_post_comments)
  • comments/Can read comments (tiki_p_read_comments)
  • wiki/Can view wiki comments (tiki_p_wiki_view_comments)

Enable comments for HomePage


Edit the page, and save.

Test


Log out, and see the error message below the comment entry text area.

(End of reproduction)

Solution

Hopefully fixed in 15.x in r57746?
Will backport to 14 if is works 😊

Importance
5
Easy to solve?
8
Priority
40
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
5827
Created
Wednesday 24 February, 2016 15:22:51 UTC
by Johnny Nielsen
LastModif
Wednesday 01 June, 2016 16:57:58 UTC


Show PHP error messages