View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
15213Bug reportsOtherpublic2020-03-09 15:37
Reporterretsofaj Assigned Tomarkusfluer 
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version4.0.0-RC3 
Target Version4.0.0-RC4Fixed in Version4.0.0-RC4 
Summary15213: Fresh install from .tar.gz does not allow for editing email templates
Description

A fresh install from https://www.limesurvey.org/development-release?download=2618:limesurvey400-rc3%20190807targz into an empty database, followed by "create a new survey" and then "click on "Email templates" results into edit areas appearing.

In the log I am seeing a 400 error when trying to GET /index.php/admin/emailtemplates/sid/925456/sa/getEmailTemplateData?YII_CSRF_TOKEN=cmYyWFNweHJiS0JrMU5ibzBJbmRwRGFXSkxDVHV5SW3eP3dbLjj4dOeBYFrLXeOS9z25faifLOGs3VL9Y6hjcQ%3D%3D HTTP/1.1" 400"

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)Version 4.0.0-RC3+190807
I will donate to the project if issue is resolvedNo
BrowserSafari
Database type & versionMySQL
Server OS (if known)Ubuntu
Webserver software & version (if known)Apache
PHP Version7.3.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

markusfluer

markusfluer

2019-09-03 16:34

administrator   ~53402

I cannot reproduce this issue.
Can you tell us a bit more about your hosting setup?

retsofaj

retsofaj

2019-09-03 19:36

reporter   ~53407

Everything in running under Docker and behind an Apache proxy. Here goes ...

Step 1 Dockerfile - creates an appropriate PHP machine

FROM php:apache

RUN apt-get update && apt-get install -y \
vim \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libldap2-dev \
libc-client-dev \
libkrb5-dev \
libzip-dev \
telnet \
&& pecl install mcrypt-1.0.2 \
&& docker-php-ext-enable mcrypt \
&& docker-php-ext-install -j$(nproc) iconv pdo_mysql zip \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install -j$(nproc) imap \
&& rm -rf /var/lib/apt/lists/*

Step 2 Dockerfile - install Limesurvey

FROM limesurvey-apache

RUN curl -o /tmp/limesurvey.tar.gz --location 'https://www.limesurvey.org/development-release?download=2618:limesurvey400-rc3%20190807targz'

RUN tar zxf /tmp/limesurvey.tar.gz --directory=/var/www/html/ --strip-components=9 \
&& rm /tmp/limesurvey.tar.gz \
&& chown -R www-data:www-data /var/www/html/

Step 3 - Apache proxy configuration

<VirtualHost *:80>
ServerName surveys.engineering.utoronto.ca
Redirect "/" "https://surveys.engineering.utoronto.ca/&quot;
ErrorLog "logs/surveys.engineering.utoronto.ca-80-error_log"
CustomLog "logs/surveys.engineering.utoronto.ca-80-access_log" common
</VirtualHost>

<VirtualHost *:443>
ServerName surveys.engineering.utoronto.ca

Ensures that server-constructed URLs are controlled by the server

UseCanonicalName On

ErrorLog &quot;logs/surveys.engineering.utoronto.ca-443-error_log&quot;
CustomLog &quot;logs/surveys.engineering.utoronto.ca-443-access_log&quot; common

SSLEngine on
SSLCertificateFile &quot;/usr/local/apache2/conf/surveys.engineering.utoronto.ca-201908.certificate.cer&quot;
SSLCertificateKeyFile &quot;/usr/local/apache2/conf/surveys.engineering.utoronto.ca-201908.private.key&quot;
SSLCACertificateFile &quot;/usr/local/apache2/conf/surveys.engineering.utoronto.ca-201908.intermediates.cer&quot;

ProxyRequests Off
ProxyPass / &quot;http://surveys-engineering/&quot;
ProxyPassReverse / &quot;http://surveys-engineering/&quot;

</VirtualHost>

Step 4 - launch things

docker run \
--detach \
--restart=unless-stopped \
--volume=/opt/machine/etc/apache/apache2-conf:/mnt/apache2/conf \
--volume=/opt/machine/etc/apache/shibboleth/shibboleth2.xml:/etc/shibboleth/shibboleth2.xml \
--volume=/opt/machine/mnt/web-proxy/documentroots:/mnt/apache2/documentroots \
--network=engsci_virtual \
--publish=80:80 \
--publish=443:443 \
--name web-proxy \
custom-apache2

docker run \
--detach \
--restart=unless-stopped \
--volume=/opt/machine/mnt/surveys-engineering/upload:/var/www/html/upload \
--volume=/opt/machine/etc/surveys/etc/surveys-engineering-config.php:/var/www/html/application/config/config.php \
--network=engsci_virtual \
--name surveys-engineering \
custom-limesurvey

The strange thing is that all of the other features seem to be working - the only one that I can see having an issue is the mail templates. Is there any place I can look in the MySQL database to see whether something is missing?

retsofaj

retsofaj

2019-09-04 04:18

reporter   ~53408

Some more investigating - and starting again from scratch with an empty database, etc. - shows the server responding to https://surveys.engineering.utoronto.ca/index.php/admin/emailtemplates/sid/499984/sa/getEmailTemplateData?YII_CSRF_TOKEN=Uk1HZXR-X0h6VXBDN0k2TmJQWnhNMFFhcUxxdF9zSVorNrPaLnzGL6biHh688yLBLIz1o3rj14hZJriGjAquEA%3D%3D with an 400 error and the claim of "Your request is invalid. The request could not be understood by the server due to malformed syntax.Please do not repeat the request without modifications"

I'm not immediately sure how to debug this message as I'm pretty sure that it's coming from the underlying framework.

retsofaj

retsofaj

2019-09-04 13:26

reporter   ~53422

I installed limesurvey3.17.15+190903.tar.gz using the identical process and the email templates came up cleanly.

markusfluer

markusfluer

2019-09-05 11:07

administrator   ~53454

I will mark this as resolve.
I also tried to install ls through docker and couldn't reproduce it either.

retsofaj

retsofaj

2019-09-05 15:05

reporter   ~53473

This is really, really strange as I wiped everything, installed again, and this time Published a port so that I could access the Docker instance directly (e.g. removed the proxy server from the chain). And - of course - it doesn’t work.

Can you share the Dockerfile that you used? And (ideally) how I can debug the Yi framework to see what it thinks is happening? I’m assuming that “You request is invalid” errors can be traced somehow.

markusfluer

markusfluer

2019-09-05 15:14

administrator   ~53474

I used this one https://github.com/adamzammit/limesurvey-docker

I just changed the top lines to take the current release.
To debug it, you may tap into the container and activate debug mode in the application/config/config.php (set debug to 2)
That way you will get a trace of what is broken.

Issue History

Date Modified Username Field Change
2019-08-30 23:22 retsofaj New Issue
2019-09-03 16:34 markusfluer Assigned To => markusfluer
2019-09-03 16:34 markusfluer Status new => feedback
2019-09-03 16:34 markusfluer Note Added: 53402
2019-09-03 19:36 retsofaj Note Added: 53407
2019-09-03 19:36 retsofaj Status feedback => assigned
2019-09-04 04:18 retsofaj Note Added: 53408
2019-09-04 13:26 retsofaj Note Added: 53422
2019-09-05 11:07 markusfluer Note Added: 53454
2019-09-05 11:07 markusfluer Status assigned => resolved
2019-09-05 11:07 markusfluer Resolution open => fixed
2019-09-05 11:07 markusfluer Fixed in Version => 4.0.0-RC4
2019-09-05 15:05 retsofaj Note Added: 53473
2019-09-05 15:14 markusfluer Note Added: 53474
2019-09-24 11:30 c_schmitz Target Version => 4.0.0-RC4
2020-03-09 15:37 c_schmitz Status resolved => closed