View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
19213Bug reportsTheme editorpublic2023-11-02 09:06
Reporterteracomp Assigned Tomfavetti  
PrioritynoneSeverityblock 
Status closedResolutionno change required 
Product Version6.3.x 
Summary19213: Edit Theme doesn't work
Description

I applied the latest updates to 6.3.1, the 6.3.2. Now I have NO ability to edit themes, and the themes are not being applied to surveys.

Steps To Reproduce

Steps to reproduce

Login to Lime Survey Admin
Click "Edit Themes"

Expected result

List of themes to edit, including previously extended themes that are located on the file system.

Actual result

500: Internal Server Error Argument 1 passed to Twig\Environment::createTemplate() must be of the type string, null given, called in /home/hgctoo5/public_html/truewiring.com/app/s/application/core/LSETwigViewRenderer.php on line 518

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 6.3.2+231031
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySql (10.2.44-MariaDB)
Server OS (if known)linux
Webserver software & version (if known)maybe: 3.10.0-1160.53.1.vz7.185.3
PHP Version7.4

Users monitoring this issue

mfavetti

Activities

mfavetti

mfavetti

2023-10-30 22:37

developer   ~78158

have you tried clearing twig/assets cache

teracomp

teracomp

2023-10-31 00:25

reporter   ~78160

Not only does "Edit Themes" fail, but themes are NOT being applied to surveys. I have 47 active surveys. All are now defaulting to whatever fallback theme applies. I have no ability to edit or control the layout.

teracomp

teracomp

2023-10-31 00:27

reporter   ~78161

Yes, I cleared the cache. I've tried different browsers. Same result.

mfavetti

mfavetti

2023-10-31 01:13

developer   ~78162

just to avoid miscommunication, I'm not referring to the browser's cache. since the error mentioned the twig template engine, I thought it might be related the application's cache

limesurvey/tmp/assets (can clear this in Configuration -> Global -> General -> Clear assets cache -> Clear now)

delete these folders:
limesurvey/tmp/runtime/cache
limesurvey/tmp/runtime/HTML
limesurvey/tmp/runtime/twig_cache
limesurvey/tmp/runtime/URI

then refresh the app

mfavetti

mfavetti

2023-10-31 01:13

developer   ~78163

can you use the theme editor on one of the base themes?

teracomp

teracomp

2023-10-31 01:43

reporter   ~78164

I've tried all of the above, several times. Clear now, then deleted the runtime folders as listed. Still:
500: Internal Server Error Argument 1 passed to Twig\Environment::createTemplate() must be of the type string, null given, called in /home/hgctoo5/public_html/truewiring.com/app/s/application/core/LSETwigViewRenderer.php on line 518

mfavetti

mfavetti

2023-10-31 01:44

developer   ~78165

is the error only on your customized theme? or also on the included base themes?

teracomp

teracomp

2023-10-31 01:45

reporter   ~78166

I can't see any themes. When I click "Edit Themes" I immediately get the 500 error

mfavetti

mfavetti

2023-10-31 02:08

developer   ~78167

can you try the following:

make a backup of your upload directory to your local machine (just in case)
rename your upload directory to something else
extract the attached upload.zip and copy to your app directory/upload (just the blank upload directoy from the last 6.x release)
make writeable by webserver

can you see theme editor now?

after...
delete new upload folder
move renamed old upload folder to upload

thank you for trying this troubleshooting, I cannot reproduce your issue on my installation, so I'm trying to narrow down what might be different

upload.zip (7,927 bytes)
mfavetti

mfavetti

2023-10-31 02:12

developer   ~78168

also if you set debug=2, is there any more information, can you screen shot?

teracomp

teracomp

2023-10-31 09:09

reporter   ~78169

YES! That allows me to see Themes!

Where do I set debug=2?

mfavetti

mfavetti

2023-10-31 09:11

developer   ~78170

okay, so one of your themes has a problem... if there is no confidentiality issue, can you zip and upload you themes here and I can take a look?

debug=2 is in the config.php file

teracomp

teracomp

2023-10-31 09:14

reporter   ~78171

No issues with privacy. Adding themes zip here (2.8MB)

themes.zip (2,825,061 bytes)
mfavetti

mfavetti

2023-10-31 09:15

developer   ~78172

thanks! i will check with this tomorrow

teracomp

teracomp

2023-10-31 09:18

reporter   ~78173

set debug=>2 in application/config/config.php

// LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and get full access to standard templates
'debug'=>2,
'debugsql'=>0, // Set this to 1 to enanble sql logging, only active when debug = 2

teracomp

teracomp

2023-10-31 10:04

reporter   ~78177

To narrow the issue, I added the themes one folder at a time.

I was able to create the error when I added the hgc_default_no_resume folder. That is fantastic. Now we know where the error is coming from. NOTE: This theme is not being used in any active surveys. It can be deleted.

But it appears that all of my customization is not compatible with the new version of LS. My main theme, as you might guess, is TrueWiring_Main.

Of the 47 active surveys I have, 39 use TrueWiring_Main, 2=ECO, 1=inherit, 2=Next Initiative (extends TrueWiring_Main), 2=TrueWiring_CJCC (extends TrueWiring_Main), 1=Waypoint_Extends_TrueWiring_Main. Essentially, all of my themes (except ECO).

45 of the 47 active surveys depend on TrueWiring_Main (extends bootswatch)
the other 2 use ECO (extends bootswatch)

Please let me know if there is a way to edit my TrueWiring_Main theme to make it compatible with the new version of LS.

teracomp

teracomp

2023-11-01 09:55

reporter   ~78197

Please advise if there is any way I can use TrueWiring_Main and ECO themes in the current version OR if I need to rebuild the themes from scratch.

mfavetti

mfavetti

2023-11-02 02:46

developer   ~78202

i will take a look when I have a chance

mfavetti

mfavetti

2023-11-02 09:00

developer   ~78208

on the TrueWiring_Main, I added the following to confix.xml (after metadata section)

<compatibility>
<version>6.0</version>
</compatibility>

and it worked for me, does that work for you too?

mfavetti

mfavetti

2023-11-02 09:06

developer   ~78209

okay, that worked on ECO also

I'm going to go ahead and close this as it's not a bug, but a problem with your custom theme. in the future, you can get some hints on how your custom theme should be updated by comparing with the updated included theme you inherit from. not ideal, but it works for me.

Issue History

Date Modified Username Field Change
2023-10-30 21:25 teracomp New Issue
2023-10-30 21:25 teracomp File Added: Screenshot 2023-10-30 at 3.49.18 PM.png
2023-10-30 22:37 mfavetti Note Added: 78158
2023-10-30 22:37 mfavetti Bug heat 0 => 2
2023-10-31 00:25 teracomp Note Added: 78160
2023-10-31 00:25 teracomp Bug heat 2 => 4
2023-10-31 00:27 teracomp Note Added: 78161
2023-10-31 01:13 mfavetti Note Added: 78162
2023-10-31 01:13 mfavetti Note Added: 78163
2023-10-31 01:43 teracomp Note Added: 78164
2023-10-31 01:44 mfavetti Note Added: 78165
2023-10-31 01:45 teracomp Note Added: 78166
2023-10-31 02:08 mfavetti Note Added: 78167
2023-10-31 02:08 mfavetti File Added: upload.zip
2023-10-31 02:12 mfavetti Note Added: 78168
2023-10-31 09:09 teracomp Note Added: 78169
2023-10-31 09:11 mfavetti Note Added: 78170
2023-10-31 09:14 teracomp Note Added: 78171
2023-10-31 09:14 teracomp File Added: themes.zip
2023-10-31 09:15 mfavetti Note Added: 78172
2023-10-31 09:18 teracomp Note Added: 78173
2023-10-31 10:04 teracomp Note Added: 78177
2023-10-31 10:04 teracomp File Added: Screenshot 2023-10-31 at 4.30.35 AM.png
2023-11-01 09:55 teracomp Note Added: 78197
2023-11-02 02:46 mfavetti Note Added: 78202
2023-11-02 08:58 mfavetti Issue Monitored: mfavetti
2023-11-02 08:58 mfavetti Bug heat 4 => 6
2023-11-02 09:00 mfavetti Note Added: 78208
2023-11-02 09:06 mfavetti Note Added: 78209
2023-11-02 09:06 mfavetti Assigned To => mfavetti
2023-11-02 09:06 mfavetti Status new => closed
2023-11-02 09:06 mfavetti Resolution open => no change required