View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
17488Bug reportsSurvey editingpublic2021-09-21 15:43
Reportertpartner Assigned Toollehar  
PrioritylowSeveritycrash 
Status acknowledgedResolutionopen 
Product Version3.25.19 
Target Version3.x 
Summary17488: Cannot view survey after updating to version 3.27.9 with custom twig extension (breaks survey)
DescriptionA fresh pull from GIT (3.x-LTS), updating to version 3.27.9, results in an error "Property "LSETwigViewRenderer.user_extensions" is not defined." when trying to execute or preview a survey or editing a survey theme.

For execute survey or edit theme, debug=0, see capture_2.png.
For execute survey, debug=1, see capture_3.png.
For edit theme, debug=1, see capture_4.png.

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build) 3.27.9
I will donate to the project if issue is resolvedNo
Browsern/a
Database type & versionlibmysql - mysqlnd 5.0.12-dev
Server OS (if known)Windows 10
Webserver software & version (if known)Apache/2.4.39 (Win64)
PHP Version7.3.7

Users monitoring this issue

User List Mazi

Activities

tpartner

tpartner

2021-08-01 14:56

developer  

capture_2.png (12,224 bytes)   
capture_2.png (12,224 bytes)   
capture_3.png (131,111 bytes)
capture_4.png (449,178 bytes)
DenisChenu

DenisChenu

2021-08-01 15:57

developer   ~65763

accessible_vanilla ?
DenisChenu

DenisChenu

2021-08-01 15:58

developer   ~65764

https://gitlab.com/SondagesPro/SurveyThemes/accessible_vanilla ?
Archived, outdated
But must not broke in 3.X
tpartner

tpartner

2021-08-01 16:20

developer   ~65765

Reverting to release 3.26.3+210511 fixes it.
tpartner

tpartner

2021-08-01 16:27

developer   ~65766

> accessible_vanilla ?

All themes.
ollehar

ollehar

2021-08-02 10:34

administrator   ~65767

Debug = 2 and stacktrace?
ollehar

ollehar

2021-08-02 10:35

administrator   ~65768

Oh, stacktrace was in other pic, sorry.
ollehar

ollehar

2021-08-02 10:35

administrator   ~65769

No one reported this from our hosting. Strange.
ollehar

ollehar

2021-08-02 10:35

administrator   ~65770

Can it be reproduced on a fresh install?
tpartner

tpartner

2021-08-02 15:07

developer   ~65773

No.

The problem appears when I set 'use_custom_twig_extensions'=>true in config.php.

Have we scrapped custom twig extensions?
ollehar

ollehar

2021-08-02 15:08

administrator   ~65774

Uh, not that I know of. Denis?
DenisChenu

DenisChenu

2021-08-02 16:44

developer   ~65776

I never use this. Louis add it.
ollehar

ollehar

2021-08-02 16:49

administrator   ~65777

I don't see any difference in the code between 3.x and master here.

application/core/LSYii_Application.php: $aApplicationConfig['components']['twigRenderer']['user_extensions'][] = $extensionClass;
ollehar

ollehar

2021-08-03 12:32

administrator   ~65785

Any ideas? Can you help us reproduce it?
tpartner

tpartner

2021-08-03 13:27

developer   ~65786

> Any ideas? Can you help us reproduce it?

Did you try 'use_custom_twig_extensions'=>true in config.php, and testing a custom twig extension?

Louis has some readme files in /upload/twig/extensions.
ollehar

ollehar

2021-08-03 14:00

administrator   ~65787

> testing a custom twig extension

How?
tpartner

tpartner

2021-08-03 14:26

developer   ~65788

Place this in a survey theme twig file - {{ helloWorld() }}. It will fire Louis' helloWorld() sample function and return "Hello world".

Or, for a sample with a little HTML, upload the attached extension file to /upload/twig/extensions/ and add this to the twig file - {{ testFunction1() | raw }}.
ollehar

ollehar

2021-08-03 16:07

administrator   ~65791

Got it, thanks!
galads

galads

2021-08-03 16:44

administrator   ~65794

I confirm the error. However, I think the report should be "using custom twig extension breaks survey" since it does not happen for normal customization of themes without using twig extension.

Issue History

Date Modified Username Field Change
2021-08-01 14:56 tpartner New Issue
2021-08-01 14:56 tpartner File Added: capture_2.png
2021-08-01 14:56 tpartner File Added: capture_3.png
2021-08-01 14:56 tpartner File Added: capture_4.png
2021-08-01 15:57 DenisChenu Note Added: 65763
2021-08-01 15:58 DenisChenu Note Added: 65764
2021-08-01 16:20 tpartner Note Added: 65765
2021-08-01 16:27 tpartner Note Added: 65766
2021-08-02 10:34 ollehar Note Added: 65767
2021-08-02 10:35 ollehar Note Added: 65768
2021-08-02 10:35 ollehar Note Added: 65769
2021-08-02 10:35 ollehar Note Added: 65770
2021-08-02 15:07 tpartner Note Added: 65773
2021-08-02 15:08 ollehar Note Added: 65774
2021-08-02 16:44 DenisChenu Note Added: 65776
2021-08-02 16:49 ollehar Note Added: 65777
2021-08-03 12:32 ollehar Note Added: 65785
2021-08-03 12:32 ollehar Assigned To => ollehar
2021-08-03 12:32 ollehar Status new => feedback
2021-08-03 13:27 tpartner Note Added: 65786
2021-08-03 13:27 tpartner Status feedback => assigned
2021-08-03 14:00 ollehar Note Added: 65787
2021-08-03 14:26 tpartner Note Added: 65788
2021-08-03 14:26 tpartner File Added: TestFunction1_Twig_Extension.zip
2021-08-03 15:20 ollehar Priority none => normal
2021-08-03 16:07 ollehar Note Added: 65791
2021-08-03 16:44 galads Note Added: 65794
2021-08-03 16:44 galads Bug heat 6 => 8
2021-08-03 16:45 galads Status assigned => acknowledged
2021-08-13 15:16 galads Priority normal => low
2021-08-13 15:16 galads Summary Cannot view survey after updating to version 3.27.9 => Cannot view survey after updating to version 3.27.9 with custom twig extension (breaks survey)
2021-09-21 15:43 Mazi Issue Monitored: Mazi
2021-09-21 15:43 Mazi Bug heat 8 => 10