View Issue Details

IDProjectCategoryView StatusLast Update
13544Bug reports[All Projects] Theme editorpublic2018-05-25 11:30
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version3.6.x 
Summary13544: Unable to use flatEllipsizeText function in (some) twig file
Description

When try to use flatEllipsizeText function inside a twig file, get a PHP Warning

Steps To Reproduce

Create new template , update welcome.twig, replace {{ aSurveyInfo.name }} by {{ flatEllipsizeText(aSurveyInfo.name) }}

For example

Additional Information

You use it https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/vanilla/views/subviews/navigation/question_index_menu.twig#L84

But this line never happen (for group in aSurveyInfo.aQuestionIndex.indexItems ;) )

File one is with survey.name , file 2 is for https://github.com/LimeSurvey/LimeSurvey/pull/1017/files#diff-b129b6e3232beafcba1ea99f003ae449R28

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.5.4 github
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database & DB-Versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 13542 closedDenisChenu Question index (head) show diable even if work 

Activities

DenisChenu

DenisChenu

2018-03-27 15:49

developer  

PHP warning.html (82,233 bytes)
Test other shown.html (7,162 bytes)
DenisChenu

DenisChenu

2018-03-30 14:28

developer   ~47298

@LouisGac : maybe create a new rewrirte and simplest function in LS_Twig_Extension
One for flattenString : remove all script + tag + new line
One for ellipsize : flatten + elipsize

Without using old flattenText

If : OK ; assign it to me.

DenisChenu

DenisChenu

2018-03-30 15:41

developer   ~47299

https://github.com/LimeSurvey/LimeSurvey/pull/1032

DenisChenu

DenisChenu

2018-04-11 17:41

developer   ~47405

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

c_schmitz

c_schmitz

2018-05-25 11:30

administrator   ~47844

Version 3.8.1+180524 released

Related Changesets

LimeSurvey: master 092ea046

2018-04-11 17:37:17

DenisChenu

Details Diff
Fixed issue 13544: Unable to use flatEllipsizeText function in (some) twig file
Dev: Add 2 function : flatString and ellipsizeString
Dev: move flatEllipsizeText to LS_Twig_Extension
Dev: set it at deprecated (4.0)
Affected Issues
13544
mod - application/config/internal.php Diff File
mod - application/core/LS_Twig_Extension.php Diff File

Issue History

Date Modified Username Field Change
2018-03-27 15:49 DenisChenu New Issue
2018-03-27 15:49 DenisChenu Status new => assigned
2018-03-27 15:49 DenisChenu Assigned To => LouisGac
2018-03-27 15:49 DenisChenu File Added: PHP warning.html
2018-03-27 15:49 DenisChenu File Added: Test other shown.html
2018-03-30 14:28 DenisChenu Note Added: 47298
2018-03-30 14:53 DenisChenu Relationship added related to 13542
2018-03-30 14:53 DenisChenu Assigned To LouisGac => DenisChenu
2018-03-30 15:41 DenisChenu Assigned To DenisChenu => LouisGac
2018-03-30 15:41 DenisChenu Status assigned => feedback
2018-03-30 15:41 DenisChenu Note Added: 47299
2018-04-10 18:38 DenisChenu Assigned To LouisGac => DenisChenu
2018-04-10 18:39 DenisChenu Status feedback => assigned
2018-04-11 17:41 DenisChenu Changeset attached => LimeSurvey master 092ea046
2018-04-11 17:41 DenisChenu Note Added: 47405
2018-04-11 17:41 DenisChenu Resolution open => fixed
2018-04-11 18:39 DenisChenu Status assigned => resolved
2018-04-11 18:39 DenisChenu Fixed in Version => 3.6.x
2018-05-25 11:30 c_schmitz Note Added: 47844
2018-05-25 11:30 c_schmitz Status resolved => closed