View Issue Details

This bug affects 2 person(s).
 34
IDProjectCategoryView StatusLast Update
17991Bug reportsImport/Exportpublic2022-05-20 09:50
ReporterMazi Assigned Togabrieljenik  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version3.25.20 
Summary17991: Importing a question from the "List questions" menu fails with 400 error
Description

Importing a question when creating a new question at the "Structure" menu works fine, link structure is like this:
https://limesurvey-domain.com/index.php/admin/questions/sa/importview/groupid//surveyid/233826 (missing group ID in URL BTW but that still works fine)

When going to the "List questions" screen and clicking "Import question" button on top, I get this error:
400: Bad Request
Your request is invalid.

URL is different:
https://limesurvey-domain.com/index.php/admin/questions/sa/importview/surveyid/233826

Steps To Reproduce

Steps to reproduce

Import a question at the "List question" screen

Expected result

Question import screen should load.

Actual result

400 server error is shown.

TagsNo tags attached.
Bug heat34
Complete LimeSurvey version number (& build)Version 3.28.3+220315
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5
Server OS (if known)Ubuntu 18
Webserver software & version (if known)Apache
PHP Version7.3.33

Relationships

has duplicate 18005 closedgabrieljenik impossible to upload a .lsq (question export file) 
has duplicate 18131 closedgabrieljenik Import question throws CHttpException Your request is invalid error 

Users monitoring this issue

User List tassoman

Activities

galads

galads

2022-04-12 10:30

administrator   ~69003

Hello Mazi,
This should already be fixed in recent versions.
Can you please check if this issue still exists in the latest version of LimeSurvey and let us know?
Thank you!

Mazi

Mazi

2022-04-12 11:22

updater   ~69004

@galads, this is still an issue at latest Version 3.28.6+220412. You just need to follow the 2 steps outlined above to find out.

gabrieljenik

gabrieljenik

2022-04-13 15:14

manager   ~69056

PR: https://github.com/LimeSurvey/LimeSurvey/pull/2349

This is just a workaround.

We still need to review if the change below (making the groupid mandatory) is still necesarry, so we can review a more integral approach. e877a50#diff-8ba52d76c0ab5c25746214e40fd926cfdb0ae2024bd7bcdd90f1035014f5be12R141

If not necessary, the urls that point to the screen may need some reviewal in the order of the parameters and the ones being sent.

tassoman

tassoman

2022-05-04 16:41

reporter   ~69386

Inside version 3.27.34 also structure "add question > import" get broken after some click.

My procedure was:

  1. open structure view
  2. click on group #2
  3. click new question
  4. click import
  5. import works correctly
  6. question pops at the end of group
  7. drag question at previous position
  8. click group #2
  9. click add question (again)
  10. click import question - and then broke (status 400)
tassoman

tassoman

2022-05-04 16:52

reporter   ~69387

When you lose "/gid/319" query string value, if you force it by appending it in the url it's missing, when you land at the import controller, gid become groupid:
admin/questions/sa/importview/groupid/319/surveyid/151891

Maybe it's relevant

gabrieljenik

gabrieljenik

2022-05-05 15:05

manager   ~69424

@tassoman Nice digging. Can I ask you to please open a new ticket?

tassoman

tassoman

2022-05-06 11:36

reporter   ~69469

filed in 18089

gabrieljenik

gabrieljenik

2022-05-10 12:17

manager   ~69539

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=33475

LimeBot

LimeBot

2022-05-16 11:23

administrator   ~69662

Fixed in Release 3.28.11+220517

Related Changesets

LimeSurvey: 3.x-LTS 02783b41

2022-05-10 12:13:46

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 17991: Importing a question from the "List questions" menu fails with 400 error (#2349)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
Affected Issues
17991
mod - application/controllers/admin/questions.php Diff File
mod - application/views/admin/survey/surveybar_addgroupquestion.php Diff File

Issue History

Date Modified Username Field Change
2022-03-25 10:18 Mazi New Issue
2022-03-25 12:57 galads Assigned To => galads
2022-03-25 12:57 galads Status new => acknowledged
2022-04-12 10:30 galads Note Added: 69003
2022-04-12 10:30 galads Bug heat 0 => 2
2022-04-12 10:30 galads Status acknowledged => feedback
2022-04-12 11:22 Mazi Note Added: 69004
2022-04-12 11:22 Mazi Bug heat 2 => 4
2022-04-12 11:22 Mazi Status feedback => assigned
2022-04-13 09:11 galads Assigned To galads => gabrieljenik
2022-04-13 09:11 galads Priority none => normal
2022-04-13 15:14 gabrieljenik Note Added: 69056
2022-04-13 15:14 gabrieljenik Bug heat 4 => 6
2022-04-13 15:14 gabrieljenik Status assigned => testing
2022-04-21 21:31 gabrieljenik Relationship added has duplicate 18005
2022-04-21 21:31 gabrieljenik Bug heat 6 => 12
2022-05-04 16:23 guest Bug heat 12 => 18
2022-05-04 16:24 tassoman Issue Monitored: tassoman
2022-05-04 16:24 tassoman Bug heat 18 => 20
2022-05-04 16:41 tassoman Note Added: 69386
2022-05-04 16:41 tassoman Bug heat 20 => 22
2022-05-04 16:52 tassoman Note Added: 69387
2022-05-05 15:05 gabrieljenik Note Added: 69424
2022-05-06 11:36 tassoman Note Added: 69469
2022-05-10 12:17 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 02783b41
2022-05-10 12:17 gabrieljenik Note Added: 69539
2022-05-10 12:17 gabrieljenik Resolution open => fixed
2022-05-16 11:23 LimeBot Note Added: 69662
2022-05-16 11:23 LimeBot Status testing => closed
2022-05-16 11:23 LimeBot Bug heat 22 => 24
2022-05-20 09:50 DenisChenu Relationship added has duplicate 18131
2022-05-20 09:50 DenisChenu Bug heat 24 => 34