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
Try the attached patch, or the next dev release.
Cheers,
Stella
#2
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...)
<?phpif ($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
<?phpif ($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
Thank you, Stella. I back ported this to 5.x.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.