Jump to:
| Project: | Frequently Asked Questions |
| Version: | 6.x-1.8 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Nice module first of all! Just what I need for my site. Now a bug report...
My site is in Russian so are the frequently asked questions. I began entering questions and then I went to the Weight tab. The list displayed some questions but not others. The problem is incorrect truncation of multibyte strings in the following piece of code in faq_weight_settings_form(), which can generate invalid UTF-8 sequence:
while ($node = db_fetch_object($result)) {
$title = (drupal_strlen($node->title) <= 64) ? $node->title : substr_replace($node->title, "...", 63);
$options[$node->nid] = $title;
$order .= "$node->nid,";
}
$order = rtrim($order, ",");To fix the problem, the following line: $title = (drupal_strlen($node->title) <= 64) ? $node->title : substr_replace($node->title, "...", 63);
should be replaced with something like: $title = (drupal_strlen($node->title) <= 64) ? $node->title : drupal_substr($node->title, 0, 63) . "...";
Comments
#1
Subscribing. We have the same error! Please, commit this issue.
#2
But we have another version of this module.
#3
Committed, thanks!
#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
Released in faq 6.x-1.9 and 5.x-2.13.