Users without 'answer question' permission can't choose 'category'

stella - February 27, 2009 - 11:49
Project:FAQ_Ask
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:stella
Status:closed
Description

Users without the 'answer question' permission can't choose a category in which to ask their question, even when the "Only expert can categorize" option is disabled.

#1

stella - February 27, 2009 - 11:50
Status:active» fixed

Try the attached patch, or the next dev release.

Cheers,
Stella

AttachmentSize
faq_ask_385650.patch 726 bytes

#2

tirsales - February 27, 2009 - 12:33

At least in my case now another bug is open:

Fatal error: [] operator not supported for strings in drupal-6.10/sites/all/modules/faq_ask/faq_ask.module on line 451

Proposed fix:

(file: faq_ask.module, line 444...)

<?php
     
if ($params['category'] == -1) {
       
$body = t('The following question has been posted.', NULL, $language->language);
      }
      else {
       
$body = t('The following question has been posted in the "!cat" category.', array('!cat' => filter_xss($term->name)));
      }
?>

into
<?php
     
if ($params['category'] == -1) {
       
$body[] = t('The following question has been posted.', NULL, $language->language);
      }
      else {
       
$body[] = t('The following question has been posted in the "!cat" category.', array('!cat' => filter_xss($term->name)));
      }
?>

--edit: I apologize, this should have gone to (and in fact now is) at #338165: "Give" anonymous page to expert.. I should avoid using multiple tabs.

#3

NancyDru - February 28, 2009 - 15:01

Thank you, Stella. I back ported this to 5.x.

#4

System Message - March 14, 2009 - 15:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.