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
Comment #1
andyceo commentedSubscribing. We have the same error! Please, commit this issue.
Comment #2
andyceo commentedBut we have another version of this module.
Comment #3
stella commentedCommitted, thanks!
Comment #5
stella commentedReleased in faq 6.x-1.9 and 5.x-2.13.