View Issue Details

This bug affects 1 person(s).
 20
IDProjectCategoryView StatusLast Update
09944Bug reportsTheme editorpublic2015-12-15 13:15
ReporterDOwen Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.06+ 
Summary09944: Find button or Ctrl+F feature not working within code field of Template Editor
Description

The 'Find Ctrl+F)' button does not work, nor does using the keyboard shortcut, when trying to find text within a code field of the Template Editor. Browser Find works fine. Tested in Chrome, Firefox and IE, issue apparent on all 3 browsers.

Steps To Reproduce

Template Editor > Click a file > Click 'Find (ctrl + F)' button

TagsNo tags attached.
Attached Files
Bug heat20
Complete LimeSurvey version number (& build)150911
I will donate to the project if issue is resolvedNo
BrowserSee notes
Database type & version2.06
Server OS (if known)Windows 7
Webserver software & version (if known)Unknown
PHP VersionUnknown

Relationships

has duplicate 09830 closedc_schmitz HTML-Editor in Template Editor doesn't work 
related to 10027 closedc_schmitz Installation doesn't work in /app 

Users monitoring this issue

fabrob11

Activities

DenisChenu

DenisChenu

2015-10-06 08:31

developer   ~33319

Can you test with debug mode at 2 ? I'm sure it's a js Compress issue .

And see at your js console if there are a error (and send it here)

elisa

elisa

2015-10-23 12:21

developer   ~33421

I have the same problem. After switching debug to 2 I get in the console:

SyntaxError: missing ; before statement
ext-searchbox.js (wiersz 2, kolumna 7)
TypeError: t is null
c_f4b23...2096.js (wiersz 749, kolumna 191981)

wiersz=row, kolumna=column

DenisChenu

DenisChenu

2015-10-23 14:24

developer   ~33423

Then not js compress issue .... i can not reproduce , with FireFox 41.0.2 and last version.

elisa

elisa

2015-10-23 14:37

developer   ~33424

Now I see that in fact I didn't switch debug to 2. I tried again and I got hundreds lines of code. Most of them are repeated:

Strict Standards: Only variables should be passed by reference in /var/www/clients/client213/web577/web/framework/i18n/gettext/CGettextMoFile.php on line 76 Strict Standards: Only variables should be passed by reference in /var/www/clients/client213/web577/web/framework/i18n/gettext/CGettextMoFile.php on line 234 ....

And then:

Cannot modify header information - headers already sent by (output started at /var/www/clients/client213/web577/web/framework/i18n/gettext/CGettextMoFile.php:234)

/var/www/clients/client213/web577/web/application/core/Survey_Common_Action.php(241)

229 if (!empty($sAction))
230 {
231 $sViewPath .= $sAction . '/';
232 }
233
234
235
236 // Header
237 ob_start();
238 if(!isset($aData['display']['header']) || $aData['display']['header'] !== false)
239 {
240 // Send HTTP header
241 header("Content-type: text/html; charset=UTF-8"); // needed for correct UTF-8 encoding
242 Yii::app()->getController()->_getAdminHeader();
243 }
244
245
246 // Menu bars
247 if (!isset($aData['display']['menu_bars']) || ($aData['display']['menu_bars'] !== false && (!is_array($aData['display']['menu_bars']) || !in_array('browse', array_keys($aData['display']['menu_bars'])))))
248 {
249 if(!isset($aData['updatedbaction']))
250 {
251 $this->_updatenotification();
252 Yii::app()->getController()->_showadminmenu(!empty($aData['surveyid']) ? $aData['surveyid'] : null);
253 }

Stack Trace
#0

/var/www/clients/client213/web577/web/application/core/Survey_Common_Action.php(241): header("Content-type: text/html; charset=UTF-8")

236 // Header
237 ob_start();
238 if(!isset($aData['display']['header']) || $aData['display']['header'] !== false)
239 {
240 // Send HTTP header
241 header("Content-type: text/html; charset=UTF-8"); // needed for correct UTF-8 encoding
242 Yii::app()->getController()->_getAdminHeader();
243 }
244
245
246 // Menu bars

#1

/var/www/clients/client213/web577/web/application/controllers/admin/templates.php(1231): Survey_Common_Action->_renderWrappedTemplate()

1226 @param array $aData Data to be passed on. Optional.
1227
/
1228 protected function _renderWrappedTemplate($sAction = 'templates', $aViewUrls = array(), $aData = array())
1229 {
1230 $aData['display']['menu_bars'] = false;
1231 parent::_renderWrappedTemplate($sAction, $aViewUrls, $aData);
1232 }
1233 }

#2

/var/www/clients/client213/web577/web/application/controllers/admin/templates.php(348): templates->_renderWrappedTemplate()

343 App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . "admin_core.js");
344 App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . "admin_core.js");
345 App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'templates.js');
346 App()->getClientScript()->registerPackage('ace');
347 App()->getClientScript()->registerPackage('jquery-superfish');
348 $this->_renderWrappedTemplate('templates', $aViewUrls);
349
350 if ($screenname != 'welcome')
351 Yii::app()->session['step'] = 1;
352 // This helps handle the load/save buttons)
353 else

#3
unknown(0): templates->index("template.css", "welcome", "Card_Sort")
#4
+
/var/www/clients/client213/web577/web/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(templates, array("template.css", "welcome", "Card_Sort"))
#5
+
/var/www/clients/client213/web577/web/application/core/Survey_Common_Action.php(99): CAction->runWithParamsInternal(templates, ReflectionMethod, array("editfile" => "template.css", "screenname" => "welcome", "templatename" => "Card_Sort", "sa" => "view"))
#6
+
/var/www/clients/client213/web577/web/application/controllers/admin/templates.php(33): Survey_Common_Action->runWithParams(array("editfile" => "template.css", "screenname" => "welcome", "templatename" => "Card_Sort", "sa" => "view"))
#7
+
/var/www/clients/client213/web577/web/framework/web/CController.php(308): templates->runWithParams(array("editfile" => "template.css", "screenname" => "welcome", "templatename" => "Card_Sort", "sa" => "view"))
#8
+
/var/www/clients/client213/web577/web/framework/web/CController.php(286): CController->runAction(templates)
#9
+
/var/www/clients/client213/web577/web/framework/web/CController.php(265): CController->runActionWithFilters(templates, array())
#10
+
/var/www/clients/client213/web577/web/application/controllers/AdminController.php(159): CController->run("templates")
#11
+
/var/www/clients/client213/web577/web/framework/web/CWebApplication.php(282): AdminController->run("templates")
#12
+
/var/www/clients/client213/web577/web/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/templates/sa/view")
#13
+
/var/www/clients/client213/web577/web/framework/base/CApplication.php(184): CWebApplication->processRequest()
#14
+
/var/www/clients/client213/web577/web/index.php(211): CApplication->run()
2015-10-23 14:27:37 Apache/2.2.16 (Debian) Yii Framework/1.1.15

DenisChenu

DenisChenu

2015-10-23 15:06

developer   ~33430

Last edited: 2015-10-23 15:06

You PḦP version (set debug to 0 to go to PHPinfo).

ANd actually : with debug=0 , try adding :
'clientScript'=>array(
'combineJs'=>false,
'compressJs'=>false,
),

At same level than
'urlManager' => array(
......
),

DenisChenu

DenisChenu

2015-10-23 15:15

developer   ~33431

Confirm the issue :

'urlManager' => array(

...............
),
'clientScript'=>array(
'combineJs'=>true,
'compressJs'=>false,
'excludeFiles'=>array(
'/third_party/ace/ace.js',
),
),
),
// Use the following config variable to set modified optional settings copied from config-defaults.php
'config'=>array(

Fix the issue ....

elisa

elisa

2015-10-23 15:39

developer   ~33433

After adding the code to config.php the search option works.

DenisChenu

DenisChenu

2015-10-23 15:43

developer   ~33435

For debug error : Forum post : https://www.limesurvey.org/en/forum/installation-a-update-issues/102774-upgrade-failed-and-replacing-previous-install-failing-too#127614

I'm not sure if it's PHP version or if we need to fix this.

c_schmitz

c_schmitz

2015-12-04 09:18

administrator   ~33661

Not an easy fix. We will need to replace the ExtendedClient extensions with a better one.

fabrob11

fabrob11

2015-12-04 09:40

reporter   ~33665

J'ai le même problème. Je suis en PHP Version 5.3.3 avec une base PostgreSQL 8.4.20.
J'ai suivi la procédure de Denis Chenu mais les boutons Find et Replace ne fonctionnent pas alors que Undo et Redo fonctionnent correctement !

I have the same problem. I am in PHP Version 5.3.3 with 4.8.20 PostgreSQL database.
I followed the procedure by Denis Chenu but the Find and Replace buttons will not work as Undo and Redo work properly!

DenisChenu

DenisChenu

2015-12-04 10:13

developer   ~33670

@c_schmitz : yes , and same for map.js.

Quick fix is update https://github.com/LimeSurvey/LimeSurvey/blob/master/application/config/internal.php#L42 (excludeFiles) in internal.php BUT : if user protect non assets url : broken.

@fabrob11 : 'combineJs'=>false, fix the issue. If you have another error : please copy/paste the javascript error log .....

c_schmitz

c_schmitz

2015-12-04 16:43

administrator   ~33710

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=16380

c_schmitz

c_schmitz

2015-12-04 16:43

administrator   ~33711

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=16381

fabrob11

fabrob11

2015-12-07 14:13

reporter   ~33723

Thank you. Everything seems to work correctly

c_schmitz

c_schmitz

2015-12-15 13:15

administrator   ~33952

2.06+ Build 151215 released

Related Changesets

LimeSurvey: master d1c08e96

2015-12-04 15:42:57

c_schmitz

Details Diff
Fixed issue 09944: Find feature not working within code field of template editor Affected Issues
09944
mod - application/config/internal.php Diff File

LimeSurvey: master 6f869cf1

2015-12-04 15:43:42

c_schmitz

Details Diff
Fixed issue 09944: Find feature not working within code field of template editor Affected Issues
09944
mod - application/config/internal.php Diff File

Issue History

Date Modified Username Field Change
2015-10-05 12:43 DOwen New Issue
2015-10-05 12:43 DOwen File Added: limesurvey_question_33.lsq
2015-10-06 08:31 DenisChenu Note Added: 33319
2015-10-23 12:21 elisa Note Added: 33421
2015-10-23 14:24 DenisChenu Note Added: 33423
2015-10-23 14:25 DenisChenu File Added: Capture du 2015-10-23 14-24-48.png
2015-10-23 14:37 elisa Note Added: 33424
2015-10-23 15:06 DenisChenu Note Added: 33430
2015-10-23 15:06 DenisChenu Note Edited: 33430
2015-10-23 15:15 DenisChenu Note Added: 33431
2015-10-23 15:39 elisa Note Added: 33433
2015-10-23 15:43 DenisChenu Note Added: 33435
2015-12-02 09:41 fabrob11 Issue Monitored: fabrob11
2015-12-03 18:09 c_schmitz Assigned To => c_schmitz
2015-12-03 18:09 c_schmitz Status new => assigned
2015-12-04 09:18 c_schmitz Note Added: 33661
2015-12-04 09:40 fabrob11 Note Added: 33665
2015-12-04 10:13 DenisChenu Note Added: 33670
2015-12-04 16:43 c_schmitz Changeset attached => LimeSurvey master d1c08e96
2015-12-04 16:43 c_schmitz Note Added: 33710
2015-12-04 16:43 c_schmitz Resolution open => fixed
2015-12-04 16:43 c_schmitz Changeset attached => LimeSurvey master 6f869cf1
2015-12-04 16:43 c_schmitz Note Added: 33711
2015-12-04 17:03 c_schmitz Status assigned => resolved
2015-12-04 17:03 c_schmitz Fixed in Version => 2.06+
2015-12-07 14:13 fabrob11 Note Added: 33723
2015-12-08 15:09 c_schmitz Relationship added related to 10027
2015-12-08 17:34 c_schmitz Relationship added has duplicate 09830
2015-12-11 14:40 c_schmitz Category Templates => Theme editor
2015-12-15 13:15 c_schmitz Note Added: 33952
2015-12-15 13:15 c_schmitz Status resolved => closed
2021-08-02 17:20 guest Bug heat 18 => 20