Welcome to the LimeSurvey Community Forum

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

Question theme for arrays

  • fishfang
  • fishfang's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #197861 by fishfang
Question theme for arrays was created by fishfang
I want to create a question theme for arrays, but I keep getting the message "Question theme could not be converted to LimeSurvey 4 standard. Reason: No matching core theme with the name arrays could be found". I attached my file structure.

I have the feeling that it has something to do with the fact that array themes are 2 level deep whereas the others are only 1 level deep? This why lines 847-848 in QuestionTheme.php don't work because he is searching only 1 level deep? Is there a workaround?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197869 by tpartner
Replied by tpartner on topic Question theme for arrays
Bug reported two months ago and STILL NOT FIXED!

- bugs.limesurvey.org/view.php?id=15919

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, fishfang
The topic has been locked.
  • fishfang
  • fishfang's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #197873 by fishfang
Replied by fishfang on topic Question theme for arrays
So is there any workaround?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #197893 by tpartner
Replied by tpartner on topic Question theme for arrays
Not as far as I know.

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
The topic has been locked.
More
3 years 11 months ago - 3 years 11 months ago #199640 by preiam
Replied by preiam on topic Question theme for arrays
I replaced line 847 in application/models/QuestionTheme.php with:

Code:
if (strpos($sQuestionConfigFilePath, "/answer/arrays") !== false) {
     $sThemeDirectoryName = basename(dirname($sQuestionConfigFilePath, 2)) . "/" . basename(dirname($sQuestionConfigFilePath, 1));
} else {
     $sThemeDirectoryName = basename(dirname($sQuestionConfigFilePath, 1));
}

I was then able to install my /arrays/texts/ question theme.
Last edit: 3 years 11 months ago by preiam.
The following user(s) said Thank You: tpartner
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199743 by tpartner
Replied by tpartner on topic Question theme for arrays
Thanks.

Unfortunately, I would not expect this or any other fix to be incorporated into the core code in the foreseeable future. At the weekly dev meeting I was told by the core team that "Question themes are not supported in LimeSurvey 4.x at the moment." and was given no indication of when this regression would be addressed. It seems that the core team has de-prioritized question themes. I continue to advise using 3.x for production, use 4.x for testing only.

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, holch
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose