View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
13135Bug reportsSurvey takingpublic2018-02-21 16:46
Reporterabc99 Assigned Toollehar  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.0.0-rc.x 
Fixed in Version3.4.x 
Summary13135: Doesn't redirect to end URL: "Cross-Origin Request Blocked:"
Description

In stead of being forwarded to the end url, I am redireceted back to the survey welcome page

The js console in firefox outputs:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://example.org/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

(chrome displays the same information, but the wording differs)

I'm unsure, if this is a bug, or some setting on my webserver.. However, I think it is a bug, I suppose a simple redirect shouldn't involve a server setting.

Steps To Reproduce

1) Create a survey,
2) fill out an 'end url' in in 'text elements' sub menu
3) enable 'Automatically load URL when survey complete' in 'presentation' sub menu
4) activate survey - answer it - it wont redirect

TagsNo tags attached.
Bug heat12
Complete LimeSurvey version number (& build)3.0.0.rc3
I will donate to the project if issue is resolvedNo
Browserchrome - latest, firefox - latest
Database type & versionIrrelevant
Server OS (if known)Linux
Webserver software & version (if known)Apache
PHP Version7.1

Users monitoring this issue

There are no users monitoring this issue.

Activities

LouisGac

LouisGac

2018-01-08 11:37

developer   ~45456

it's a server configuration problem.

abc99

abc99

2018-01-19 02:07

reporter   ~45902

Are you sure it is a server problem and not an implementation problem?

In my case, I'm trying to redirect to a public url outside my domain.. (http://xxxxx in the example output below)

I added this line to the .htaccess file in the limesurvey root dir:
Header set Access-Control-Allow-Origin "*"

However, I now get this error (console output from chrome):

Failed to load https://xxxxxxx: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://yyyyyyyy' is therefore not allowed access. The response had HTTP status code 404.

It seems strange to me that I can't do a simple redirect to another url, without the target domain having a specific CORS setting.
It looks as if the js script wants to load a resource on the target domain, instead of redirecting to it.

If I recall correctly, you can do a redirect in php without these problems

In any case this, I think this will cause trouble down the line for Limesurvey users.
A redirect seems simple like a simple feature, most users will not expect or have the skills to edit a server configuration to get it to work.

Please reconsider this issue
Thanks for your work on Limesurvey!

LouisGac

LouisGac

2018-01-19 11:14

developer   ~45912

np for double posting.
I still think the problem is caused by your server configuration.
I can be wrong, so I let it open.
Let's see if someone else has the same problem.

lmetizn

lmetizn

2018-02-19 12:16

reporter   ~46575

Same problem here, doesn't redirect to specified end URL (Version 3.2.1+180207)

This is the js console output (but I'm not sure if it's related to this problem):

LSLOG ReferenceError: ExprMgr_process_relevance_and_tailoring is not defined
at checkconditions (survey_runtime.js:128)
at HTMLDocument.<anonymous> (survey_runtime.js:23)
at HTMLDocument.dispatch (jquery-3.1.1.js:5201)
at HTMLDocument.elemData.handle (jquery-3.1.1.js:5009)
at Object.trigger (jquery-3.1.1.js:8171)
at jQuery.fn.init.triggerHandler (jquery-3.1.1.js:8245)
at HTMLDocument.<anonymous> (jquery-migrate-3.0.0.js:406)
at mightThrow (jquery-3.1.1.js:3570)
at process (jquery-3.1.1.js:3638)

tomscher

tomscher

2018-02-19 15:20

reporter   ~46584

Same problem here as well.

I am pretty sure that it is a problem with the new LS version - I have an older LS installation for legacy surveys which works fine on the same server with the same settings.

ollehar

ollehar

2018-02-20 13:58

administrator   ~46609

I did a fix slightly related to this, and now I can't reproduce. So maybe I accidentally fixed it.

ollehar

ollehar

2018-02-20 13:58

administrator   ~46610

I anyone can, please pull the latest git version. Otherwise, wait till the next release in a couple of days and test again.

ollehar

ollehar

2018-02-20 13:59

administrator   ~46611

Possibly fixed by this: https://github.com/LimeSurvey/LimeSurvey/commit/2ad38e8db69550c84bf3108c73c200a1a0caba6a

c_schmitz

c_schmitz

2018-02-21 16:46

administrator   ~46698

Version 3.4.1. released

Issue History

Date Modified Username Field Change
2018-01-06 20:14 abc99 New Issue
2018-01-08 11:37 LouisGac Assigned To => LouisGac
2018-01-08 11:37 LouisGac Status new => closed
2018-01-08 11:37 LouisGac Resolution open => no change required
2018-01-08 11:37 LouisGac Note Added: 45456
2018-01-19 02:07 abc99 Status closed => feedback
2018-01-19 02:07 abc99 Resolution no change required => reopened
2018-01-19 02:07 abc99 Note Added: 45902
2018-01-19 02:09 abc99 Status feedback => assigned
2018-01-19 11:14 LouisGac Note Added: 45912
2018-02-19 12:16 lmetizn Note Added: 46575
2018-02-19 15:20 tomscher Note Added: 46584
2018-02-19 15:52 ollehar Assigned To LouisGac => ollehar
2018-02-20 13:58 ollehar Note Added: 46609
2018-02-20 13:58 ollehar Note Added: 46610
2018-02-20 13:59 ollehar Status assigned => resolved
2018-02-20 13:59 ollehar Resolution reopened => fixed
2018-02-20 13:59 ollehar Fixed in Version => 3.4.x
2018-02-20 13:59 ollehar Note Added: 46611
2018-02-21 16:46 c_schmitz Note Added: 46698
2018-02-21 16:46 c_schmitz Status resolved => closed