View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
04380Bug reportsSurvey editingpublic2010-07-13 02:27
ReporterJoyLaneResearch Assigned ToMazi  
PrioritynormalSeveritypartial_block 
Status closedResolutionno change required 
Product Version1.87+ 
Summary04380: Can't get HTML editor to work.
Description

Regardless of how I configure "Default HTML editor mode" on the "Global settings" screen, I can't get the HTML editor to work. The drop-down editor menu bar does not appear, the little arrow to make it appear also does not appear. If I choose the "Global setting" for "Popup HTML editor" the pencil appears, but when I click on it, the window that pops up has nothing in it. It does, however, provide the following error message:

"Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.5; OfficeLivePatch.1.3)
Timestamp: Mon, 31 May 2010 15:34:40 UTC

Message: 'FCKeditor' is undefined
Line: 30
Char: 2
Code: 0
URI: http://jlrsurveys.com/survey/admin/htmleditor-popup.php?fieldname=question_en&fieldtext=[Question:](en)&fieldtype=question-text&action=editquestion&sid=38491&gid=30&qid=86&lang=en"

Steps To Reproduce

Occurs on every survey I've tested on two servers, with different browsers.

Additional Information

I have LS installed on two different Windows servers and have the same problem on both.

Also, I saw fixes to .htaccess in the forum and tried them, but they didn't work for me either. My .htaccess file currently contains the line, "AddType application/xml .xsl".

Though the editor window is blank, the following HTML code is behind it:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
    <title>Editing [Question:](en)</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="noindex, nofollow" />
    <script type="text/javascript" src="http://jlrsurveys.com/survey/admin/scripts/fckeditor.2641/fckeditor.js"></script>
</head>
<body>
<form method='post' onsubmit='saveChanges=true;'>

        <input type='hidden' name='checksessionbypost' value='adpyhyi4d2' />
        <script type='text/javascript'>
<!--
function closeme()
{
    window.onbeforeunload = new Function('return true;');
    self.close();
}

window.onbeforeunload= function (evt) {
    close_editor();
    closeme();
}

var saveChanges = false;

var oFCKeditor = new FCKeditor( 'MyTextarea' );
oFCKeditor.BasePath = 'http://jlrsurveys.com/survey/admin/scripts/fckeditor.2641/';
oFCKeditor.Height   = '350';
oFCKeditor.Width    = '98%';
oFCKeditor.Value      = window.opener.document.getElementsByName("question_en")[0].value;
oFCKeditor.Config["CustomConfigurationsPath"] = "http://jlrsurveys.com/survey/admin/scripts/fckeditor.2641/limesurvey-config.js";
oFCKeditor.Config["ToolbarStartExpanded"] = true;
oFCKeditor.Config["ToolbarCanCollapse"] = false;
oFCKeditor.ToolbarSet = 'LimeSurveyToolbarfullPopup';
oFCKeditor.Config["LimeReplacementFieldsSID"] = "38491";
oFCKeditor.Config["LimeReplacementFieldsGID"] = "30";
oFCKeditor.Config["LimeReplacementFieldsQID"] = "85";
oFCKeditor.Config["LimeReplacementFieldsType"] = "question-text";
oFCKeditor.Config["LimeReplacementFieldsAction"] = "editquestion";
oFCKeditor.Config["SmileyPath"] = "http://jlrsurveys.com/survey/upload/images/smiley/msn/";

oFCKeditor.Create();

function FCKeditor_OnComplete( editorInstance )
{
    //editorInstance.Events.AttachEvent( 'OnSelectionChange', DoSomething ) ;
    editorInstance.ToolbarSet.CurrentInstance.Commands.GetCommand('FitWindow').Execute();
    window.status='LimeSurvey Editing [Question:](en)';
}

function html_transfert()
{
    var oEditor = FCKeditorAPI.GetInstance('MyTextarea');
    var editedtext = oEditor.GetXHTML('no strip new line');

    window.opener.document.getElementsByName('question_en')[0].value = editedtext;
}

function close_editor()
{
    if (saveChanges == false)
    {
        if (confirm('Do you want to save your changes ?'))
        {
            html_transfert();
        }   
    }

    if (saveChanges == true)
    {
        html_transfert();
    }

    window.opener.document.getElementsByName('question_en')[0].readOnly= false;
    window.opener.document.getElementsByName('question_en')[0].className='htmlinput';
    window.opener.document.getElementById('question_en_popupctrlena').style.display='';
    window.opener.document.getElementById('question_en_popupctrldis').style.display='none';
    window.opener.focus();
    return true;
}

//-->
        </script>
</form> 
</body>
</html>
TagsNo tags attached.
Attached Files
Survey and 2 Screens.zip (449,648 bytes)
Bug heat8
Complete LimeSurvey version number (& build)8518
I will donate to the project if issue is resolved
BrowserIE8 (64-bit and 32-bit versions) and FireFox 3.6.
Database type & versionSQL Server 2005 and MySQL (version # unknown)
Server OS (if known)Windows (version # unknown)
Webserver software & version (if known)Windows (version # unknown)
PHP Version5.2 on one server, unknown on the other
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

tpartner

tpartner

2010-06-01 14:55

partner   ~12053

I cannot duplicate the problem but the path to the editor scripts is suspect. As far as I can tell http://jlrsurveys.com/survey/admin/scripts/fckeditor.2641/ does not exist.

In both my 1.87 and 1.90 versions the editor scripts are in surveyRoot/admin/scripts//fckeditor.266/.

Did you modify $fckeditordir in config.php or config-defaults.php?

Mazi

Mazi

2010-06-01 14:56

updater   ~12054

  1. Did you try to re-upload all files in binary mode?

  2. Please switch on debug mode by adding the following line to your config.php file:
    [code]$debug = '1';[/code]

Are there any additional errors reported on top of the page?

JoyLaneResearch

JoyLaneResearch

2010-06-02 00:09

reporter   ~12073

Responded via email - please forgive if duplicated response:

I verified the directory for the editor. It exists and appears correctly defined in the configs. Config-defaults.php is unmodified, but in config.php the directory structure reflects the jlrsurveys/survey/admin path. I'm away from my desk or I'd copy the relevant parts of the config so you would be able to judge for yourself. For the most part the Limesurvey install appears to function correctly. (There are other minor issues, like text overflows, but these are not a big deal.)

When I FTP'd the files to the site, I used binary mode. The site has been generally stable and functional for a month through three survey projects. I haven't raised these questions before because I was able to do my own HTML programming and drop it into the question field. But a current project needs a little more sophistication and a working editor would be a big help.

Here are some exerpts from the current configuration files.

Config.php:
$rooturl = "http://{$_SERVER['HTTP_HOST']}/survey";

Config-defaults.php:
$homeurl = "$rooturl/admin";
$fckeditordir = "$homeurl/scripts/fckeditor.266";
$fckeditorexpandtoolbar = true;

Mazi

Mazi

2010-06-02 11:07

updater   ~12075

The path seems to be the problem. At my 1.90 version the source shows:
<script type="text/javascript" src="http://localhost/limeSOURCE/limesurvey_svn/admin/scripts/fckeditor.266/fckeditor.js"></script>

At config-defaults the following setting can be found:
$fckeditordir = "$homeurl/scripts/fckeditor.266";

Please check if there is any setting in config.php which might overwrite the default setting.

JoyLaneResearch

JoyLaneResearch

2010-06-02 13:00

reporter   ~12090

@Mazi - I don't see anything in my config.php file that would override the default, aside from the line shown in my comment above, that changes the rooturl.

Is the problem in the path to fckeditor - the .266 versus the .2641? If so, how do I solve it?

Mazi

Mazi

2010-06-02 13:19

updater   ~12092

Thibault, any ideas?

lemeur

lemeur

2010-06-03 20:09

reporter   ~12114

This is clearly a pb of configuration file.
Somewhere the $fckeditordir is overwritten.

Try a clean install from scratch, using the package provided on sourceforge.net.
Then don't modify the config-defaults.php, just add the basic params to config.php (don't copy an old config.php).

lemeur

lemeur

2010-06-03 20:10

reporter   ~12115

Assiging it back to you MAzi, as this is a support issue, not a bug.

Mazi

Mazi

2010-07-13 02:27

updater   ~12400

No bug -> closed.

JoyLaneResearch, if you couldn't solve the problem by following lemeur's advice please open a thread at our forum.

Issue History

Date Modified Username Field Change
2010-05-31 17:47 JoyLaneResearch New Issue
2010-05-31 17:47 JoyLaneResearch Status new => assigned
2010-05-31 17:47 JoyLaneResearch Assigned To => user372
2010-05-31 17:47 JoyLaneResearch File Added: Survey and 2 Screens.zip
2010-06-01 14:54 Mazi Assigned To user372 => Mazi
2010-06-01 14:55 tpartner Note Added: 12053
2010-06-01 14:56 Mazi Note Added: 12054
2010-06-01 14:56 Mazi Status assigned => feedback
2010-06-02 00:09 JoyLaneResearch Note Added: 12073
2010-06-02 00:09 JoyLaneResearch Status feedback => assigned
2010-06-02 11:07 Mazi Note Added: 12075
2010-06-02 13:00 JoyLaneResearch Note Added: 12090
2010-06-02 13:19 Mazi Assigned To Mazi => lemeur
2010-06-02 13:19 Mazi Note Added: 12092
2010-06-03 20:09 lemeur Note Added: 12114
2010-06-03 20:09 lemeur Status assigned => feedback
2010-06-03 20:10 lemeur Assigned To lemeur => Mazi
2010-06-03 20:10 lemeur Status feedback => assigned
2010-06-03 20:10 lemeur Note Added: 12115
2010-06-03 23:02 Mazi Status assigned => feedback
2010-07-13 02:27 Mazi Note Added: 12400
2010-07-13 02:27 Mazi Status feedback => closed
2010-07-13 02:27 Mazi Resolution open => no change required
2010-10-25 00:17 c_schmitz Category Survey Design => Survey design
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing