Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Issue with Custom Theme Attributes

  • cgrewal94
  • cgrewal94's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 month 1 week ago - 1 month 1 week ago #267293 by cgrewal94
Issue with Custom Theme Attributes was created by cgrewal94
Limesurvey Version: 6.6.6

Hi there,

We are in the process of upgrading from Limesurvey 5.x to 6.x and for the most part it has been smooth. However, we are having an issue with one custom question theme where the attributes are not being passed into the twig files. When trying to access the attributes, they show up as blanks in the twig file. All our other themes don't seem to have this issue.

Is someone able to help out and see why this may be the case? I have attached a zip file of the theme.

Thanks!
Attachments:
Last edit: 1 month 1 week ago by cgrewal94. Reason: Question text was missing

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
1 month 5 days ago #267337 by DenisChenu
Replied by DenisChenu on topic Issue with Custom Theme Attributes
If i don't make error : custom_attributes muts be moved to attributes

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • cgrewal94
  • cgrewal94's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 month 3 days ago #267442 by cgrewal94
Replied by cgrewal94 on topic Issue with Custom Theme Attributes
Hi Denis,

What do you mean by this? My config.xml has the attributes tagged as "<attributes>" and "<attribute>" already. 
Attachments:

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 2 days ago #267464 by tpartner
Replied by tpartner on topic Issue with Custom Theme Attributes
Can you attach a small survey that uses this question theme?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • cgrewal94
  • cgrewal94's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 month 2 days ago #267495 by cgrewal94
Replied by cgrewal94 on topic Issue with Custom Theme Attributes
I have attached the lss file using the question theme. If I import this in our limesurvey 5.x instance everything renders fine. However, in limesurvey 6.x the theme options do not register.

Thanks in advance!

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 day ago - 1 month 1 day ago #267497 by tpartner
Replied by tpartner on topic Issue with Custom Theme Attributes
Regarding importing your theme, you are missing a couple of required tags in the config.xml file - <compatibility> and <type>.

After fixing those and importing the theme, I find that the question attributes are available in the answer.twig file but not in the answer_td.twig file. If this is a regression from 5.x, please file a bug report - bugs.limesurvey.org/

Having said that, check your console, I see JavaScript errors (possibly due to changes in the survey theme?):
- onDomReady is not defined
- processOptionsMap is not defined

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 1 month 1 day ago by tpartner.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • cgrewal94
  • cgrewal94's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 month 1 day ago #267499 by cgrewal94
Replied by cgrewal94 on topic Issue with Custom Theme Attributes
Thanks Tony! I'll try those things out when I'm back in the office.

Those console errors are for custom functions we have in our instance of limesurvey so we are all good there.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 23 hours ago #267500 by tpartner
Replied by tpartner on topic Issue with Custom Theme Attributes

Those console errors are for custom functions we have in our instance of limesurvey so we are all good there.
Not so good...those are fatal errors preventing any further script from running.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • cgrewal94
  • cgrewal94's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 month 16 hours ago #267501 by cgrewal94
Replied by cgrewal94 on topic Issue with Custom Theme Attributes
Oh sorry - to clarify, what I meant by that is that in our instance we have those custom functions saved so I don't receieve those console error messages. Those functions are used across all our custom themes and this theme is the only one with the issues.

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose