View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
11917Bug reportsTheme editorpublic2016-11-18 10:01
Reporterjmfay Assigned Toc_schmitz  
PrioritynoneSeverityblock 
Status closedResolutionunable to reproduce 
Product Version2.54 
Summary11917: Template Editor Crash upon clicking 'Save changes'
Description

Hi there,

I'm running version 2.55.3+161111.

If I go to the template editor and click 'save changes' on css/flat_and_modern.css, the error "The page cannot be displayed because an internal server error has occurred." on this redirect: limesurvey/index.php?r=admin/templates/sa/templatesavechanges.

A different error occurs when clicking 'save changes' on css/template.css when it redirects to
limesurvey/index.php?r=admin/templates/sa/templatesavechanges :

"Bad Request

The CSRF token could not be verified.

The request could not be understood by the server due to malformed syntax. Please do not repeat the request without modifications.

If you think this is a server error, please contact the webmaster.

2016-11-16 15:30:40"

Any help would be much appreciated, thank you.

Steps To Reproduce

Go to template editor.
Click 'save changes' on css/template.css or css/flat_and_modern.css.

Additional Information

This persists across all templates.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)2.55.3+161111
I will donate to the project if issue is resolvedNo
BrowserChrome Version 54.0.2840.99 m
Database type & version5.5.49 - MySQL Community Server (GPL)
Server OS (if known)Windows NT PEMWINWEB64 6.1 build 7601 (Windows Server 2008 R2 Web Server Edition Service Pack 1) i586
Webserver software & version (if known)Apache libmysql - 5.1.73
PHP Version5.6.14

Users monitoring this issue

There are no users monitoring this issue.

Activities

LouisGac

LouisGac

2016-11-16 17:05

developer   ~41990

Last edited: 2016-11-16 18:06

I can't reproduce.
I bet it's a server configuration issue.
The CSRF token issue could be related to a session problem.

c_schmitz

c_schmitz

2016-11-16 18:07

administrator   ~41999

TRy to activate in debug mode in /application/config/config.php and see if you get a more detailed error after that

jmfay

jmfay

2016-11-16 18:26

reporter   ~42003

Thanks to LouisGac for the advice on changing to Linux. I spoke with my hosting company and it is certainly possible. It would however cost me money and set me back a little bit doing that at this point, so if possible I would like to resolve the issue on my current configuration.

Hi c_schmitz,

Thanks for taking over the case :)

Here's what I've done since filing the report:

  1. I checked other browsers with brand new sessions, and this did not resolve the issue.

  2. I activated debug mode.

3.I received the same internal server error when clicking 'Save changes' on css/flat_and_modern.css as detailed in my first post.

  1. I received the following error on the when clicking on 'Save changes' with css/template.css selected in Template Editor (domain redacted):

"The CSRF token could not be verified.

\limesurvey\framework\web\CHttpRequest.php(1355)

1343 case 'DELETE':
1344 $userToken=$this->getDelete($this->csrfTokenName);
1345 }
1346
1347 if (!empty($userToken) && $cookies->contains($this->csrfTokenName))
1348 {
1349 $cookieToken=$cookies->itemAt($this->csrfTokenName)->value;
1350 $valid=$cookieToken===$userToken;
1351 }
1352 else
1353 $valid = false;
1354 if (!$valid)
1355 throw new CHttpException(400,Yii::t('yii','The CSRF token could not be verified.'));
1356 }
1357 }
1358
1359
1360 /*
1361
Returns the version of the HTTP protocol used by client.
1362
1363
@return string the version of the HTTP protocol.
1364 @since 1.1.16
1365
/
1366 public function getHttpVersion()
1367 {
Stack Trace
#0

  • \limesurvey\framework\base\CComponent.php(561): CHttpRequest->validateCsrfToken(CEvent)
    #1

  • \limesurvey\framework\base\CApplication.php(212): CComponent->raiseEvent("onBeginRequest", CEvent)
    #2

  • \limesurvey\framework\base\CApplication.php(183): CApplication->onBeginRequest(CEvent)
    #3

    \limesurvey\index.php(214): CApplication->run()
    209 die (sprintf('%s should be writable by the webserver (766 or 776).', $sDefaultRuntimePath));
    210 }
    211 }
    212
    213 Yii::$enableIncludePath = false;
    214 Yii::createApplication('LSYii_Application', $config)->run();
    215
    216 / End of file index.php /
    217 / Location: ./index.php /

2016-11-16 17:01:59 Microsoft-IIS/7.5 Yii Framework/1.1.17"

Thank you for taking ownership of this and your very prompt response :)

All the best,
James

jmfay

jmfay

2016-11-16 18:28

reporter   ~42004

Hi c_schmitz,

Another quick update which I forgot to mention:
I checked my file permissions on the server through my hosting's control panel and some stuff seems to have changed. The error report tipped me off to CApplication not having write access. I've asked them to investigate as there is absolutely no reason that should have happened.

I hope my read on that error was correct, please let me know if I've misunderstood.

All the best,
James

c_schmitz

c_schmitz

2016-11-17 10:31

administrator   ~42014

It is probable that you have some 'security' feature activated in your server that prevents the POSTing (submission) of HTML code.
Because if the page complains about a missing CSRF token it means that the requestion was basically cut off.

However it is not a LimeSurvey bug but a server configuration issue so I am closing this issue now. For further help please use the community forums instead.

Good advice might be to switch to a Linux server as mentioned because usually more people know they way around that and you will probably get more community help if oyu have problems.

LouisGac

LouisGac

2016-11-18 10:01

developer   ~42045

congrats +1

Issue History

Date Modified Username Field Change
2016-11-16 16:51 jmfay New Issue
2016-11-16 17:05 LouisGac Note Added: 41990
2016-11-16 18:06 c_schmitz Note Edited: 41990
2016-11-16 18:07 c_schmitz Assigned To => c_schmitz
2016-11-16 18:07 c_schmitz Status new => feedback
2016-11-16 18:07 c_schmitz Note Added: 41999
2016-11-16 18:26 jmfay Note Added: 42003
2016-11-16 18:26 jmfay Status feedback => assigned
2016-11-16 18:28 jmfay Note Added: 42004
2016-11-17 10:31 c_schmitz Status assigned => closed
2016-11-17 10:31 c_schmitz Resolution open => unable to reproduce
2016-11-17 10:31 c_schmitz Note Added: 42014
2016-11-18 10:01 LouisGac Note Added: 42045