View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
03303Bug reportsSurvey editingpublic2010-03-19 17:02
Reportersp00ky Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.85RC3 
Fixed in Version1.87+ 
Summary03303: "Error updating - Query was empty" when editing survey settings
Description

I've found a bug while investigating this ticket:

  • please import the survey
  • then click Edit to have the First Survey edit step
  • don't change any parameter and try to click the "Save and Continue >" button
    ==> I get the following error:
    Error updating
    Query was empty

Issue is in line 1133 of database.php:
$usquery=$connect->GetUpdateSQL($rs, $updatearray, get_magic_quotes_gpc());

TagsNo tags attached.
Attached Files
Query was empty.gif (13,940 bytes)   
Query was empty.gif (13,940 bytes)   
database.php (76,229 bytes)
Bug heat12
Complete LimeSurvey version number (& build)7008
I will donate to the project if issue is resolved
Browserchrome, ie6
Database type & versionmysql 5.0.67
Server OS (if known)MS Windows 2003 Server
Webserver software & version (if known)MS Windows 2003 Server
PHP VersionApache/2.2.11 (Win32) PHP/5.2.9-2

Users monitoring this issue

sp00ky, lemeur

Activities

user372

2009-06-09 00:11

  ~08345

Please attach a simple sample survey (survey structure as .csv-file), where we can reproduce the issue - Thx! Additionally a step-by-sep-instruction how to reproduce the issue would be very nice!

user372

2009-06-09 08:08

  ~08349

Last edited: 2009-06-09 08:10

Thx- I can reproduce the issue with your instruction.
@ lemeur: can you have a look at it?

lemeur

lemeur

2009-06-11 21:44

developer   ~08422

@Carsten,
I've found a bug while investigating this ticket:

  • please import the survey
  • then click Edit to have the First Survey edit step
  • don't change any parameter and try to click the "Save and Continue >" button
    ==> I get the following error:
    Error updating
    Query was empty

Issue is in line 1133 of database.php:
$usquery=$connect->GetUpdateSQL($rs, $updatearray, get_magic_quotes_gpc());

GetUpdateSQL returns FALSE instead of a query.

c_schmitz

c_schmitz

2009-06-12 10:38

administrator   ~08440

Last edited: 2009-06-12 10:41

Thibault: I cannot reproduce that? Are you sue your database is up to date? Can you re-run the 2 latest DB updates by setting DBVersion in settings_global to 134

lemeur

lemeur

2009-06-12 21:32

developer   ~08463

Still the same pb even after forcing update from DBVersion 134 to 137.

I deleted the survey, re-imported it and still the same pb:

  • import survey
  • click Go to survey to select the freshly imported one
  • click the Edit survey icon
  • click the Save and continue button
    => Web page is blank with :
    Error updating
    Query was empty
lemeur

lemeur

2009-06-15 09:31

developer   ~08510

Carsten, any clue where to track down this issue ?
Do we have to debug adodb ?

Thibault

c_schmitz

c_schmitz

2009-06-15 17:08

administrator   ~08515

As long as I don't get my hands on an installation where I can reproduce this I cannot track it down. Sp00ky or lemeur, can you provide access to such an installation (at least FTP access)

c_schmitz

c_schmitz

2009-06-17 10:59

administrator   ~08541

???

c_schmitz

c_schmitz

2009-06-23 01:02

administrator   ~08632

Thibault, a user in the forum wrote that this only happens if the settings were not changed on the first page - which would make sense since then there needs to be no query.
Can you check again if you get this error still if you do some changes in the first settings page?

If not then the fix is very easy - just don't execute the query if it is empty.

lemeur

lemeur

2009-06-23 14:30

developer   ~08639

@Carsten: sure this is what I meant by "don't change any parameter and try to click the "Save and Continue >" button"

lemeur

lemeur

2009-06-23 14:58

developer   ~08644

@Carsten: The issue is not only related to the fact that no parameter was changed because I can't reproduce this issue on other surveys set on the same instalaltion. For the moment only this specific survey causes the pb!!

The query isn't really empty, it is set to FALSE. The arrays given to GetUpdateSQL are not empty either

awarren

awarren

2009-06-23 20:34

reporter   ~08649

Hey -- just ran into this on a system of mine. The order of params to
GetUpdateSQL are rs, arrFields, forceUpdate, magicq, force

The way it's being call the return value for get_magic_quotes_gpc determines whether an update is forced or not -- could help explain the reproducing problems seen in 03274 and 03266

I modded my install to: (line 1132)
$usquery=$connect->GetUpdateSQL($rs, $updatearray, 0, get_magic_quotes_gpc());
if($usquery)
$usresult = $connect->Execute($usquery) or safe_die("Error updating<pre>".$usquery."</pre><br /><strong>".$connect->ErrorMsg() . "</strong>");

For a quick fix

c_schmitz

c_schmitz

2009-06-23 23:54

administrator   ~08651

Thanks awarren - that is a great fix.

c_schmitz

c_schmitz

2009-06-24 00:04

administrator   ~08652

Attached fixed file to this bug.

c_schmitz

c_schmitz

2010-03-12 15:23

administrator   ~11311

Looks like I forgot to put this fix actually in there.

c_schmitz

c_schmitz

2010-03-12 15:25

administrator   ~11312

Attached fixed file for 1.87+.
Fixed in rev. 8479

Issue History

Date Modified Username Field Change
2009-06-08 21:03 sp00ky New Issue
2009-06-08 21:03 sp00ky Status new => assigned
2009-06-08 21:03 sp00ky Assigned To => user372
2009-06-08 21:03 sp00ky Build Number => 7008
2009-06-08 21:03 sp00ky Browser => chrome, ie6
2009-06-08 21:03 sp00ky Database & DB-Version => mysql 5.0.67
2009-06-08 21:03 sp00ky Operating System (Server) => MS Windows 2003 Server
2009-06-08 21:03 sp00ky Webserver => MS Windows 2003 Server
2009-06-08 21:03 sp00ky PHP Version => Apache/2.2.11 (Win32) PHP/5.2.9-2
2009-06-09 00:11 user372 Note Added: 08345
2009-06-09 00:11 user372 Status assigned => feedback
2009-06-09 08:01 sp00ky File Added: limesurvey_survey_49832.csv
2009-06-09 08:08 user372 Note Added: 08349
2009-06-09 08:10 user372 Note Edited: 08349
2009-06-09 08:10 user372 Status feedback => assigned
2009-06-09 08:10 user372 Assigned To user372 => lemeur
2009-06-09 09:44 sp00ky Issue Monitored: sp00ky
2009-06-11 21:40 lemeur Assigned To lemeur => c_schmitz
2009-06-11 21:44 lemeur Note Added: 08422
2009-06-11 21:44 lemeur Issue Monitored: lemeur
2009-06-12 10:38 c_schmitz Note Added: 08440
2009-06-12 10:40 c_schmitz Assigned To c_schmitz => lemeur
2009-06-12 10:41 c_schmitz Note Edited: 08440
2009-06-12 18:55 c_schmitz Status assigned => resolved
2009-06-12 18:55 c_schmitz Fixed in Version => 1.85
2009-06-12 18:55 c_schmitz Resolution open => fixed
2009-06-12 21:30 lemeur Status resolved => assigned
2009-06-12 21:30 lemeur Assigned To lemeur => c_schmitz
2009-06-12 21:32 lemeur Note Added: 08463
2009-06-12 21:43 lemeur Assigned To c_schmitz => lemeur
2009-06-15 08:12 sp00ky File Added: Query was empty.gif
2009-06-15 09:31 lemeur Assigned To lemeur => c_schmitz
2009-06-15 09:31 lemeur Note Added: 08510
2009-06-15 17:08 c_schmitz Note Added: 08515
2009-06-17 10:59 c_schmitz Note Added: 08541
2009-06-17 10:59 c_schmitz Status assigned => feedback
2009-06-17 11:00 c_schmitz Summary Array (flexible labels) and Long free text => "Error updating - Query was empty" when editing survey settings
2009-06-17 11:01 c_schmitz Description Updated
2009-06-23 01:00 c_schmitz Status feedback => assigned
2009-06-23 01:00 c_schmitz Assigned To c_schmitz => lemeur
2009-06-23 01:02 c_schmitz Note Added: 08632
2009-06-23 01:02 c_schmitz Status assigned => feedback
2009-06-23 14:30 lemeur Note Added: 08639
2009-06-23 14:58 lemeur Note Added: 08644
2009-06-23 20:34 awarren Note Added: 08649
2009-06-23 23:54 c_schmitz Note Added: 08651
2009-06-23 23:55 c_schmitz Status feedback => assigned
2009-06-23 23:55 c_schmitz Assigned To lemeur => c_schmitz
2009-06-23 23:59 c_schmitz Status assigned => resolved
2009-06-23 23:59 c_schmitz Fixed in Version 1.85 => 1.85+
2009-06-24 00:02 c_schmitz File Deleted: limesurvey_survey_49832.csv
2009-06-24 00:03 c_schmitz File Added: database.php
2009-06-24 00:04 c_schmitz Note Added: 08652
2009-06-29 22:45 c_schmitz Status resolved => closed
2010-03-12 15:23 c_schmitz Note Added: 11311
2010-03-12 15:23 c_schmitz Status closed => feedback
2010-03-12 15:23 c_schmitz Resolution fixed => reopened
2010-03-12 15:23 c_schmitz File Deleted: database.php
2010-03-12 15:24 c_schmitz File Added: database.php
2010-03-12 15:25 c_schmitz Note Added: 11312
2010-03-12 15:25 c_schmitz Status feedback => resolved
2010-03-12 15:25 c_schmitz Fixed in Version 1.85+ => 1.87+
2010-03-12 15:25 c_schmitz Resolution reopened => fixed
2010-03-19 17:02 c_schmitz Status resolved => closed
2010-10-25 00:17 c_schmitz Category Survey Design => Survey design
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing
2021-08-03 22:06 guest Bug heat 8 => 12