View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
17374Bug reportsTheme editorpublic2022-03-14 11:35
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version5.x 
Summary17374: aSurveyInfo.datasecurity_notice_label do not return only the label
Description

aSurveyInfo.datasecurity_notice_label return the real label for inline text , nut with collapsible text : it's updated.
This make harder for theme dev to have a different sentence

Steps To Reproduce

Import inluded survey and included template, try to update or find sentence "Afficher la politique" in model.

This come from updated aSurveyInfo.datasecurity_notice_label
With inline : aSurveyInfo.datasecurity_notice_label return the real clean value.

Additional Information

Return clean value is always needed if you want Theme developer make great theme.

Same variable must return same value always.

Sentence : https://github.com/LimeSurvey/LimeSurvey/blob/86d4a00c551c1f11e91991eadcd635ec9514486c/themes/survey/vanilla/views/subviews/privacy/privacy_modal.twig#L22
«Same» sentence : https://github.com/LimeSurvey/LimeSurvey/blob/86d4a00c551c1f11e91991eadcd635ec9514486c/themes/survey/vanilla/views/subviews/privacy/privacy_text.twig#L27

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)3.27.2
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2021-06-20 18:41

developer   ~64955

https://github.com/LimeSurvey/LimeSurvey/blob/d0b555b6afac21281d1ba8a7e258082b4067b9aa/application/models/Survey.php#L2045

galads

galads

2021-07-12 12:53

reporter   ~65373

Last edited: 2022-03-03 15:58

Want to create a PR?

DenisChenu

DenisChenu

2021-07-12 13:00

developer   ~65374

Last edited: 2022-03-03 15:58

Not really ... if report issue make me make a PR each time, maybe i don't report new issue

galads

galads

2021-07-12 13:03

reporter   ~65375

Last edited: 2022-03-03 15:58

I will create a task in the backlog. It will be assigned according to priority.

gabrieljenik

gabrieljenik

2021-10-01 15:33

manager   ~66726

Last edited: 2022-03-03 15:58

The problem here is that this requires themes to be updated and will make non updated themes to no work anymore (if they have overriden the related twig)

How should we handle this?
Maybe adding a new option NoticeLabelTitle (which always returns the raw value)?

Thanks!

DenisChenu

DenisChenu

2021-11-08 10:16

developer   ~67168

Last edited: 2022-03-03 15:58

@gabrieljenik : maybe we can add the default twig file ?

with something like this :

{{ aSurveyInfo.STARTPOLICYLINK }} gT("Show policy") {{ aSurveyInfo.ENDPOLICYLINK }}
{{ aSurveyInfo.dataSecurityNoticeLabel }}

?

Or use twig {{replace({STARTPOLICYLINK}) ??

really complex here … dumb integration create hard to fix issue.

gabrieljenik

gabrieljenik

2021-11-08 16:20

manager   ~67178

Last edited: 2022-03-03 15:58

Maybe adding a new option NoticeLabelTitle (which always returns the raw value)?

Wouldn't this be easier?

DenisChenu

DenisChenu

2021-11-08 16:58

developer   ~67182

Last edited: 2022-03-03 15:58

It's not the issue : the issue is really allow update the HTML

Here : If iwant to use a button and not a link (it's an action button) : i can not do it
If i want to add data-xx or spcecific boostrap class : i can not do it
If i want to remove the br : i ca not do it.

ALL html must come from twig, not only string.

gabrieljenik

gabrieljenik

2021-11-08 17:09

manager   ~67186

Last edited: 2022-03-03 15:58

From your prior comment, what aSurveyInfo.STARTPOLICYLINK would be like?

maybe we can add the default twig file ?
So you say a new subscreen with the proper logic (which now is on php side, so it would be moved to twig), so it can be updatable?

DenisChenu

DenisChenu

2021-11-08 17:49

developer   ~67187

Last edited: 2022-03-03 15:58

So you say a new subscreen with the proper logic (which now is on php side, so it would be moved to twig), so it can be updatable?

Yes, all HTML produced for survey must be in twig file

From your prior comment, what aSurveyInfo.STARTPOLICYLINK would be like?

Arg … you're right :)

There are 2 system
{STARTPOLICYLINK} in text replaced
and STARTPOLICYLINK in default twig …

DenisChenu

DenisChenu

2022-03-03 15:58

developer   ~68533

Last edited: 2022-03-03 15:58

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

guest

guest

2022-03-10 10:56

viewer   ~68609

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

LimeBot

LimeBot

2022-03-14 11:35

administrator   ~68658

Fixed in Release 5.3.5+220314

Related Changesets

LimeSurvey: master 1e04d703

2022-03-10 10:56:27

user81814


Committer: GitHub Details Diff
Fixed issue 17374: aSurveyInfo.datasecurity_notice_label do not return only the label (#2281)

Dev: allow replacement of return in template twig file
Affected Issues
17374
mod - application/config/internal.php Diff File
mod - application/models/Survey.php Diff File
add - themes/survey/vanilla/views/subviews/privacy/privacy_datasecurity_notice_label.twig Diff File

Issue History

Date Modified Username Field Change
2021-06-20 18:34 DenisChenu New Issue
2021-06-20 18:34 DenisChenu Issue generated from: 17370
2021-06-20 18:41 DenisChenu Note Added: 64955
2021-07-12 12:53 galads Note Added: 65373
2021-07-12 12:54 galads Assigned To => DenisChenu
2021-07-12 12:54 galads Status new => assigned
2021-07-12 13:00 DenisChenu Note Added: 65374
2021-07-12 13:03 galads Note Added: 65375
2021-07-12 13:04 galads Status assigned => confirmed
2021-07-12 13:04 galads Assigned To DenisChenu => galads
2021-09-10 09:04 galads Zoho Project Synchronization => |Yes|
2021-09-10 09:05 galads Assigned To galads => gabrieljenik
2021-09-10 09:05 galads Status confirmed => assigned
2021-10-01 15:33 gabrieljenik Note Added: 66726
2021-10-01 15:33 gabrieljenik Bug heat 4 => 6
2021-11-08 10:16 DenisChenu Note Added: 67168
2021-11-08 16:20 gabrieljenik Note Added: 67178
2021-11-08 16:58 DenisChenu Note Added: 67182
2021-11-08 17:09 gabrieljenik Note Added: 67186
2021-11-08 17:49 DenisChenu Note Added: 67187
2022-03-02 09:10 DenisChenu Assigned To gabrieljenik => DenisChenu
2022-03-03 15:58 DenisChenu Zoho Project Synchronization Yes => |Yes|
2022-03-03 15:58 DenisChenu Note Added: 68533
2022-03-10 10:56 user81814 Changeset attached => LimeSurvey master 1e04d703
2022-03-10 10:56 guest Note Added: 68609
2022-03-10 10:56 guest Bug heat 6 => 8
2022-03-14 11:35 LimeBot Zoho Project Synchronization Yes => |Yes|
2022-03-14 11:35 LimeBot Note Added: 68658
2022-03-14 11:35 LimeBot Status assigned => closed
2022-03-14 11:35 LimeBot Resolution open => fixed
2022-03-14 11:35 LimeBot Bug heat 8 => 10