View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18667Bug reportsSurvey editingpublic2023-10-05 00:11
Reporterjljansen Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status closedResolutionunable to reproduce 
Product Version5.6.x 
Summary18667: alias results in a 404 page after saving changes.
Description

Since I've edited the thank you page the set alias for my survey is not working anymore. The link containing the survey ID is still working for this survey.
This was with LimeSurvey CE Versie 5.6.5+230214 & comfort update. I've updated to the latest version 5.6.8+230227 but the result is the same.
I've no other survey where the alias is set to test if that is still working correctly. The alias of this survey was working fine until I've updated the thank you page.
I've deleted the alias of the current survey same result. Add a new alias to another survey also results in 404s.

I've no error in the apache error log. Only the 404 request in the access log.

Steps To Reproduce

Steps to reproduce

Set alias for survey on the edit text elements page of a survey.

Expected result

Click the link of the alias as shown on the overview page. This should show the survey when active

Actual result

I get a 404 page not found of the Apache webserver.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)5.6.8+230227
I will donate to the project if issue is resolvedNo
BrowserFirefox & Edge
Database type & version mysqlnd 7.4.3-4ubuntu2.18
Server OS (if known) Linux 5.4.0-125-generic #141-Ubuntu 20.04
Webserver software & version (if known) Apache/2.4.41 (Ubuntu)
PHP Version 7.4.3-4ubuntu2.17

Users monitoring this issue

jljansen

Activities

gabrieljenik

gabrieljenik

2023-03-09 14:32

manager   ~74072

Hi,

The alias of this survey was working fine until I've updated the thank you page.

What do you mean by "updated the thank you page".
Can you describe more?

I've no other survey where the alias is set to test if that is still working correctly.

If you create a plain new survey and set the alias, does it work?

Thanks

jljansen

jljansen

2023-03-09 21:28

reporter   ~74081

Hi,

With thank you page I mean on the Text elements page of a survey I have edited the End message. Pressed Save and the alias stopped working.

I've made a brand new survey and added an alias but also get an 404 page of the Apache webserver. Same result as with existing survey with Alias set.

gabrieljenik

gabrieljenik

2023-03-10 14:46

manager   ~74085

Will try to reproduce.

gabrieljenik

gabrieljenik

2023-03-14 15:27

manager   ~74111

We were not able to reproduce it.
Can you review the htaccess file?

jljansen

jljansen

2023-03-21 10:00

reporter   ~74214

The .htaccess files has not changed since 15-9-2021. No rights issue.
-rw-r--r-- 1 www-data www-data 1091 Sep 15 2021 .htaccess

Content:
<IfModule mod_rewrite.c>
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

# deny access to hidden files and directories except .well-known
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^(.*/)?\.+ - [F]

# deny access to composer.json that is used for remote fingerprinting
RewriteRule ^composer.json - [F]

</IfModule>

deny access to hidden files and directories without mod_rewrite

RedirectMatch 403 ^/(?!.well-known/)(.*/)?.+

General setting to properly handle LimeSurvey paths

AcceptPathInfo on

XSS protection

<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
<FilesMatch ".(svgz?)$">
Header set Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; style-src 'self' 'unsafe-inline'"
</FilesMatch>
</IfModule>

Disable Multiviews (issue 16859)

<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>

Hope this gives any help? Should setting an alias change the .htaccess file?

gabrieljenik

gabrieljenik

2023-03-21 14:51

manager   ~74217

If you go to demo.limesurvey.org, are you able to reproduce the issue?

jljansen

jljansen

2023-05-31 23:02

reporter   ~75309

On demo.limesurvey.org Limesurvey 6 is running but setting an alias will change the url from r=survey/index&sid=123456&lang=en to ?r=test (both work fine, nginx is used as server).
On my server running Limesurvey 5.6.24+230531 & Apache2 it will change /index.php/123456?lang=en to /testalias which does not work. index.php/testalias works fine though.
In my config 'showScriptName' => true is set. Which means that if an alias is set the url should change to index.php/testalias in the Overview (expected behavior) and not an alias without index.php.

mod_rewrite is enabled but cannot get limesurvey to run with 'showScriptName' => false without getting 404s for URL without index.php.

gabrieljenik

gabrieljenik

2023-06-05 15:40

manager   ~75421

mod_rewrite is enabled but cannot get limesurvey to run with 'showScriptName' => false without getting 404s for URL without index.php.

You can't get LS to run? or just the alias url?

jljansen

jljansen

2023-06-08 20:52

reporter   ~75498

LS runs great for years. Only alias url won't work.

gabrieljenik

gabrieljenik

2023-06-12 15:52

manager   ~75553

On my server running Limesurvey 5.6.24+230531 & Apache2 it will change /index.php/123456?lang=en to /testalias which does not work. index.php/testalias works fine though.
In my config 'showScriptName' => true is set. Which means that if an alias is set the url should change to index.php/testalias in the Overview (expected behavior) and not an alias without index.php.

That is expected as to allow the most friendly url possible.
Have you checked your apache rules? Maybe something that is interferring?

gabrieljenik

gabrieljenik

2023-06-12 16:58

manager   ~75558

mod_rewrite is enabled but cannot get limesurvey to run with 'showScriptName' => false without getting 404s

'showScriptName' => false is malfunctioning for alias only or for all LS installation?

jljansen

jljansen

2023-06-20 13:56

reporter   ~75732

Which Apache rules do you mean? .httaccess (= default limesurvey) or the .conf for th limesurvey domain (vhost)?
Which part should I check for?

The showscriptname = false breaks whole LS.

gabrieljenik

gabrieljenik

2023-06-20 14:19

manager   ~75733

Which Apache rules do you mean? .httaccess (= default limesurvey) or the .conf for th limesurvey domain (vhost)?
Which part should I check for?

Both I think.
Could be one or the other.

The showscriptname = false breaks whole LS.

Then it is not a matter of the alias. I think it is a web server config issue.
Please, make sure you have the default htaccess

gabrieljenik

gabrieljenik

2023-10-05 00:11

manager   ~77515

Hello jljansen,
This ticket has been open for quite some time.
Do you have any new info / feedback?
Can you please check if this issue still exists in the latest version of LimeSurvey and let us know?
Thank you!

Issue History

Date Modified Username Field Change
2023-03-03 19:25 jljansen New Issue
2023-03-03 20:40 jljansen Issue Monitored: jljansen
2023-03-03 20:40 jljansen Bug heat 0 => 2
2023-03-09 14:32 gabrieljenik Note Added: 74072
2023-03-09 14:32 gabrieljenik Bug heat 2 => 4
2023-03-09 14:32 gabrieljenik Status new => acknowledged
2023-03-09 21:28 jljansen Note Added: 74081
2023-03-09 21:28 jljansen Bug heat 4 => 6
2023-03-10 14:46 gabrieljenik Note Added: 74085
2023-03-14 15:27 gabrieljenik Note Added: 74111
2023-03-20 21:58 gabrieljenik Assigned To => gabrieljenik
2023-03-20 21:58 gabrieljenik Status acknowledged => feedback
2023-03-21 10:00 jljansen Note Added: 74214
2023-03-21 10:00 jljansen Status feedback => assigned
2023-03-21 14:51 gabrieljenik Note Added: 74217
2023-05-17 23:35 gabrieljenik Status assigned => feedback
2023-05-31 23:02 jljansen Note Added: 75309
2023-05-31 23:02 jljansen Status feedback => assigned
2023-06-05 15:40 gabrieljenik Note Added: 75421
2023-06-08 20:52 jljansen Note Added: 75498
2023-06-12 15:52 gabrieljenik Note Added: 75553
2023-06-12 16:58 gabrieljenik Note Added: 75558
2023-06-20 13:56 jljansen Note Added: 75732
2023-06-20 14:19 gabrieljenik Note Added: 75733
2023-06-26 22:37 gabrieljenik Status assigned => feedback
2023-10-05 00:11 gabrieljenik Status feedback => closed
2023-10-05 00:11 gabrieljenik Resolution open => unable to reproduce
2023-10-05 00:11 gabrieljenik Note Added: 77515