View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
20070Bug reportsOtherpublic2025-06-23 15:42
Reporterefornasier Assigned Totibor.pacalat  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version6.6.x 
Summary20070: Enabling custom twig extension goes to 500 if HelloWorld extension is present
Description

When enabling in config the custom Twig extension ( 'use_custom_twig_extensions'=>true ), if the HelloWorld_Twig_Extension (that comes by default in LS package) is present, che server will crash outside the admin area.

This is because it can't find the class Twig_Extension extended by HelloWorld_Twig_Extension.

A solution is to change that class with LS_Twig_Extension.

Steps To Reproduce

Steps to reproduce

Install LS
Set 'use_custom_twig_extensions'=>true in config.php
Browse a survey

Expected result

Everything goes as usual

Actual result

Server crashes with 500 internal server error

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)6.12.0+250317
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMariaDB 10.5.28
Server OS (if known)Debian 11
Webserver software & version (if known)Apache 2.4
PHP VersionPHP 8.1 FPM

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2025-06-11 22:41

manager   ~82865

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

DenisChenu

DenisChenu

2025-06-18 10:04

developer   ~82895

Do you use Twig_Extension at Limesurvye ?

efornasier

efornasier

2025-06-18 10:10

reporter   ~82896

@DenisChenu yes, we are using Twig_Extension in different LS installations, we have some customizations that needs to be displayed in templates and easiest way is with those.

DenisChenu

DenisChenu

2025-06-18 10:44

developer   ~82898

Then maybe best to review code by someone who use it :)

See my comment : https://github.com/LimeSurvey/LimeSurvey/pull/4319#pullrequestreview-2919734631

guest

guest

2025-06-18 16:42

viewer   ~82906

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

LimeBot

LimeBot

2025-06-23 15:42

administrator   ~82930

Fixed in Release 6.15.0+250623

Related Changesets

LimeSurvey: master f1b335c5

2025-06-18 16:42

Gabriel Jenik

Committer: GitHub


Details Diff
Fixed issue 20070: Enabling custom twig extension goes to 500 if HelloWorld extension is present (04319)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
20070
mod - upload/twig/extensions/HelloWorld_Twig_Extension/HelloWorld_Twig_Extension.php Diff File

Issue History

Date Modified Username Field Change
2025-04-22 17:26 efornasier New Issue
2025-05-28 22:35 tibor.pacalat Assigned To => gabrieljenik
2025-05-28 22:35 tibor.pacalat Status new => assigned
2025-06-11 22:41 gabrieljenik Assigned To gabrieljenik => DenisChenu
2025-06-11 22:41 gabrieljenik Status assigned => ready for code review
2025-06-11 22:41 gabrieljenik Note Added: 82865
2025-06-11 22:41 gabrieljenik Bug heat 0 => 2
2025-06-18 10:04 DenisChenu Assigned To DenisChenu => tibor.pacalat
2025-06-18 10:04 DenisChenu Status ready for code review => ready for testing
2025-06-18 10:04 DenisChenu Note Added: 82895
2025-06-18 10:04 DenisChenu Bug heat 2 => 4
2025-06-18 10:10 efornasier Note Added: 82896
2025-06-18 10:10 efornasier Bug heat 4 => 6
2025-06-18 10:44 DenisChenu Note Added: 82898
2025-06-18 16:42 Changeset attached => LimeSurvey master f1b335c5
2025-06-18 16:42 guest Note Added: 82906
2025-06-18 16:42 guest Bug heat 6 => 8
2025-06-18 16:42 tibor.pacalat Status ready for testing => resolved
2025-06-18 16:42 tibor.pacalat Resolution open => fixed
2025-06-23 15:42 LimeBot Note Added: 82930
2025-06-23 15:42 LimeBot Status resolved => closed
2025-06-23 15:42 LimeBot Bug heat 8 => 10