View Issue Details

IDProjectCategoryView StatusLast Update
0015463phplist applicationInterface - Backendpublic29-04-11 12:45
Status resolvedResolutionfixed 
Product Version2.10.12 
Target Version2.10.13Fixed in Version2.10.14 
Summary0015463: Call to iconv() doesn't fail gracefully and prevents FCKeditor from loading
DescriptionSeveral users reported that FCKeditor failed to load when opening the 'Send a Message' page. The problematic code was found in send_core.php around line 1032 and includes a call to iconv, which does not seem fail gracefully, and apparently prevents FCKeditor from loading.

The issue occurred on systems that do NOT have the iconv module included in their PHP installation.

A possible solution is to add a fall back method in case iconv isn't detected, though I'm not sure if using iconv in the first place is a very good idea, given that it apparently is a non-standard PHP extension.
Steps To ReproduceSystem details available in this forum thread:
Additional Informationbpbeinlich found the problematic code section:
==== Start Quote ====
OK, here's the culprit:

This block of code appears in send_core.php beginning at line 1032:

$utf8_subject = $subject;
$utf8_from = $from;
if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) {
$utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject);
$utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from);

The first call to iconv crashes the page. I looked deeper and discovered that these variables ($utf8_subject and $utf_from) are not used anywhere. So this code is apparently not used at all. I commented out the entire block of 6 lines and the page now displays correctly.
==== Start Quote ====
TagsNo tags attached.


related to 0015324 resolvedmichiel Subject and From turn to Gibberish when saved not in English 
related to 0015287 resolvedmichiel v2.10.10: FCKeditor doesn't load when opening the 'send a message' page. 
related to 0015299 resolvedmichiel 'Short' php tag in fckphplist.php causes FCKEditor not to load 
related to 0015215 resolvedmichiel Saphari (on MAC) -part of user interface not displayed when creating a new message 
related to 0011755 resolvedmichiel FCKeditor does not appear in the message or template editor windows 
has duplicate 0015350 resolvedmichiel "Send Message" screen is incomplete 
has duplicate 0015596 resolvedmichiel Can't Send Message FCK Editor Not Loaded 
related to 0015545 resolvedmichiel Call to iconv() doesn't fail gracefully 



28-04-10 07:42

manager   ~0050973

Last edited: 28-04-10 07:46

bpbeinlich' observation that the $utf8_subject and $utf8_from variables aren't used seems to be correct. Assuming they were to be used in the code changes suggested by lwc in issue 15324, then the changes seem to be incomplete and would probably need to look like this:

  $scheduling_content = '<table>';
// custom code - start
  $utf8_subject = $subject;
  $utf8_from = $from;
  if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) {
     $utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject);
     $utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from);

  $maincontent .= '
  <tr><td>'.Help("subject").' '.$GLOBALS['I18N']->get("Subject").':</td>
    <td><input type=text name="msgsubject"
    value="'.htmlentities($utf8_subject,ENT_QUOTES,'UTF-8').'" size=40></td></tr>
    <td colspan=2>
  <tr><td>'.Help("from").' '.$GLOBALS['I18N']->get("fromline").':</td>
    <td><input type=text name=from
    value="'.htmlentities($utf8_from,ENT_QUOTES,'UTF-8').'" size=40></td></tr>
  <tr><td colspan=2>

// custom code - end


A fall back method would still need to be added for systems that do not have the iconv extension, if you decide keep using iconv.


29-04-11 12:45

manager   ~0051196