View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 12975 | Bug reports | public | 2017-11-28 20:53 | 2018-02-19 15:06 | |
| Reporter | tpartner | Assigned To | tpartner | ||
| Priority | none | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 3.x | ||||
| Fixed in Version | 3.x | ||||
| Summary | 12975: Cannot use the twig split filter | ||||
| Description |
I tried adding "split" to the functions array in internal.php at line 265 but still got a "Twig_Sandbox_SecurityNotAllowedFilterError" when using something like below: <code>{% set foo = aGroup.name|split('-') %}</code> Reference - https://twig.symfony.com/doc/2.x/filters/split.html | ||||
| Tags | No tags attached. | ||||
| Bug heat | 6 | ||||
| Complete LimeSurvey version number (& build) | |||||
| I will donate to the project if issue is resolved | |||||
| Browser | |||||
| Database type & version | |||||
| Server OS (if known) | |||||
| Webserver software & version (if known) | |||||
| PHP Version | |||||
| Git branch / Pull Request URL | |||||
|
sure Tony, feel free to do it and to push it. |
|
|
Thanks Louis. I have pushed the change but can't test right now as my extended theme was a child of "default" which seems to have been removed. |
|
|
ok I'll have a look. |
|
|
Okay, I have tested with an extension of the bootswatch theme and still get the error when trying to use something like: <code>{% set foo = aGroup.name|split('-') %}</code> |
|
|
Hi Louis, did the split function ever get added? I don't see it in internal.php and cannot use it in Twig files. |
|
|
While we're at it, can we also add Trim - https://twig.symfony.com/doc/2.x/filters/trim.html ? |
|
|
sure, I'll do it today |
|
|
Do you want me to push a commit? |
|
|
arf I forgot sorry :( |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=26477 |
|
|
No worries, this was a want-to-have, not a need-to-have. :) Please review the commit. |
|
|
Implemented in 3.4.0. |
|
|
LimeSurvey: master e004cf1a 2018-02-15 14:12 Details Diff |
Fixed issue 12975: Cannot use the twig split filter Dev: Added split and filter functions |
Affected Issues 12975 |
|
| mod - application/config/internal.php | Diff File | ||
|
LimeSurvey: master e4b847a3 2018-02-15 14:24 Details Diff |
Fixed issue 12975: Cannot use the twig split filter Dev: Added split and filter functions |
Affected Issues 12975 |
|
| mod - application/config/internal.php | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2017-11-28 20:53 | tpartner | New Issue | |
| 2017-11-28 20:53 | tpartner | Status | new => assigned |
| 2017-11-28 20:53 | tpartner | Assigned To | => LouisGac |
| 2017-11-28 20:54 | tpartner | Description Updated | |
| 2017-11-28 20:56 | tpartner | Description Updated | |
| 2017-11-28 20:56 | tpartner | Description Updated | |
| 2017-11-28 20:57 | tpartner | Description Updated | |
| 2017-11-28 21:07 | tpartner | Description Updated | |
| 2017-11-29 10:40 |
|
Note Added: 45183 | |
| 2017-11-29 12:33 | tpartner | Note Added: 45184 | |
| 2017-11-29 12:38 |
|
Note Added: 45187 | |
| 2017-11-30 14:07 | tpartner | Note Added: 45207 | |
| 2018-02-13 23:59 | tpartner | Note Added: 46427 | |
| 2018-02-14 00:05 | tpartner | Note Added: 46428 | |
| 2018-02-14 10:24 |
|
Note Added: 46431 | |
| 2018-02-15 00:51 | tpartner | Note Added: 46496 | |
| 2018-02-15 10:43 |
|
Note Added: 46503 | |
| 2018-02-15 13:24 | tpartner | Changeset attached | => LimeSurvey master e004cf1a |
| 2018-02-15 13:24 | tpartner | Changeset attached | => LimeSurvey master e4b847a3 |
| 2018-02-15 13:24 | tpartner | Note Added: 46518 | |
| 2018-02-15 13:24 | tpartner | Assigned To | LouisGac => tpartner |
| 2018-02-15 13:24 | tpartner | Resolution | open => fixed |
| 2018-02-15 13:26 | tpartner | Note Added: 46520 | |
| 2018-02-19 15:06 | ollehar | Status | assigned => resolved |
| 2018-02-19 15:06 | ollehar | Fixed in Version | => 3.x |
| 2018-02-19 15:06 | ollehar | Note Added: 46583 | |
| 2018-02-19 15:06 | ollehar | Status | resolved => closed |
| 2026-11-20 10:33 | c_schmitz | Category | Survey Design => (No Category) |