View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
11304Bug reportsImport/Exportpublic2016-06-13 12:27
Reportergstachl Assigned ToLouisGac 
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.50.x 
Summary11304: PDF export function: (queXML PDF-Export) not working
Description

When i try to export a survey via queXML PDF Export i get an Internal Error. There are no informations in the apache log files.

Error:
Method export::index() does not exist

Additional Information

There is already a second user reporting the same problem:
https://www.limesurvey.org/forum/installation-a-update-issues/104562-pdf-export-fails#137071

TagsNo tags attached.
Attached Files
Bug heat10
Complete LimeSurvey version number (& build)160529
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMysql 5.6.28
Server OS (if known)OpenSuSE 13
Webserver software & version (if known)Apache 2.4.10
PHP Version5.6.1

Users monitoring this issue

chlarsen

Activities

c_schmitz

c_schmitz

2016-05-31 09:39

administrator   ~39042

Last edited: 2016-05-31 09:44

I cannot reproduce this. Please clear your /tmp/assets folder and activate debug mode in /application/config/config.php and see if you get a more elaborate error.

Can you also quote your config.php? (please remove any usernames/password first).

gstachl

gstachl

2016-05-31 10:10

reporter   ~39043

I cleared the tmp/assets folder and set $debug = 3. Where should i see more information? For this virtual server i use a seperate log file for errors and access. In the access-log i can see the url (for the PDF-Export), but there are no errors in the error log file.
Also journalctl -r doesn't show anything about this error.

<?php
/*

  • LimeSurvey
  • Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
  • All rights reserved.
  • License: GNU/GPL License v2 or later, see LICENSE.php
  • LimeSurvey is free software. This version may have been modified pursuant
  • to the GNU General Public License, and as distributed it includes or is
  • derivative of works licensed under the GNU General Public License or other
  • free or open source software licenses.
  • See COPYRIGHT.php for copyright notices and details.
  • $Id: config-defaults.php 4334 2008-02-25 13:21:10Z c_schmitz $
    */

/* IMPORTANT NOTICE

  • With LimeSurvey v1.70+ the configuration of LimeSurvey was simplified,
  • Now config.php only contains the basic required settings.
  • Some optional settings are also set by default in config-defaults.php.
  • If you want to change an optional parameter, DON'T change values in config-defaults.php!!!
  • Just copy the parameter into your config.php-file and adjust the value!
  • All settings in config.php overwrite the default values from config-defaults.php
    */

// Basic Setup

$databasetype = 'mysql'; // ADOdb database driver - valid values are mysql, mysqli, odbc_mssql, mssql_n, odbtp or postgres
// mysql: Recommended driver for mysql
// mysqli: Slightly faster driver for mysql - not on all server systems available
// odbc_mssql: MSSQL driver using ODBC with MS SQL Server
// mssql_n: Experimental driver for MS SQL Server which handles UTF-8 charsets
// odbtp: ODBTP driver to access MSSQL-Server is needed for this one - we also recommend to activate $databasepersistent for decent speed
// postgres: Standard postgres driver

$databaselocation = 'localhost'; // Network location of your Database - for odbcmssql use the mssql servername, not localhost or IP
$databasename = 'survey'; // The name of the database that we will create
$databaseuser = 'xxxxxx'; // The name of a user with rights to create db (or if db already exists, then rights within that db)
$databasepass = 'xxxxxx'; // Password of db user
$dbprefix = 'lime
'; // A global prefix that can be added to all LimeSurvey tables. Use this if you are sharing
// a database with other applications. Suggested prefix is 'lime_'

// File Locations
$rooturl = "http://{$_SERVER['HTTP_HOST']}&quot;; // The root web url for your limesurvey installation (without a trailing slash).
// The double quotes (") are important.

$rootdir = dirname(FILE); // This is the physical disk location for your limesurvey installation. Normally you don't have to touch this
// setting. If you use IIS then you MUST enter the complete rootdir e.g. : $rootDir='C:\Inetpub\wwwroot\limesurvey'!
// Some IIS and OS/2 installations also require to use forward slashes
// instead of backslashes, e.g. $rootDir='C:/Inetpub/wwwroot/limesurvey'!

// Installation Setup
$defaultuser = 'admin'; // This is the username when LimeSurvey is installed and the administration user is created on installation
$defaultpass = 'password'; // This is the password for the administration user when LimeSurvey is installed

// Debug Settings
$debug = 3; // Set this to 1 if you are looking for errors. If you still get no errors after enabling this
$debugsql = 0; // then please check your error-logs - either in your hosting provider admin panel or in some /logs dir
// on your webspace.
// LimeSurvey developers: Set this to 2 to circumvent the restriction to remove the installation directory
// or to change the password. If you set it to 3 then PHP STRICT warnings will be shown additionally.
//$enableLdap = 'true';

c_schmitz

c_schmitz

2016-05-31 10:18

administrator   ~39044

That is no 2.5 configuration file. That is not even config.php.

Please check for the correct one.

gstachl

gstachl

2016-05-31 10:29

reporter   ~39045

Last edited: 2016-05-31 10:32

Sorry - was the old config file from root-Directory

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
------------------------------------------------------------------- DATABASE CONNECTIVITY SETTINGS
This file will contain the settings needed to access your database.
For complete instructions please consult the 'Database Connection'
page of the User Guide.
-------------------------------------------------------------------
EXPLANATION OF VARIABLES
-------------------------------------------------------------------
'connectionString' Hostname, database, port and database type for
the connection. Driver example: mysql. Currently supported:
mysql, pgsql, mssql, sqlite, oci
'username' The username used to connect to the database
'password' The password used to connect to the database
'tablePrefix' You can add an optional prefix, which will be added
to the table name when using the Active Record class

*/
return array(
'basePath' => dirname(dirname(FILE)),
'runtimePath' => dirname(dirname(dirname(FILE))).DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'runtime',
'name' => 'LimeSurvey',
'defaultController' => 'survey',

'import' => array(
    'application.core.*',
    'application.models.*',
    'application.controllers.*',
    'application.modules.*',
),

'components' => array(
    'db' => array(
        'connectionString' => 'mysql:host=localhost;port=3306;dbname=survey',
        'emulatePrepare' => true,
        'username' => 'xxxxxx',
        'password' => 'xxxxxx',
        'charset' => 'utf8',
        'tablePrefix' => 'lime_',
    ),

/
'session' => array (
'class' => 'system.web.CDbHttpSession',
'connectionID' => 'db',
'sessionTableName' => '{{sessions}}',
),
/
'urlManager' => array(
'urlFormat' => 'get',
'rules' => require('routes.php'),
'showScriptName' => true,
),
// Use the following config variable to set modified optional settings copied from config-defaults.php
'config'=>array(
// debug: Set this to 1 if you are looking for errors. If you still get no errors after enabling this
// then please check your error-logs - either in your hosting provider admin panel or in some /logs directory
// on your webspace.
// LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and get full access to standard templates
'debug'=>2,
'debugsql'=>1 // Set this to 1 to enanble sql logging, only active when debug = 2
)
)
);
/ End of file config.php /
/ Location: ./application/config/config.php /

LouisGac

LouisGac

2016-06-07 17:04

developer   ~39297

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=19366

chlarsen

chlarsen

2016-06-07 17:07

reporter   ~39299

I can confirm that this issue persists in version 2.50+, build160606.
This is the debug output with debug set to "1" I get:
--------------------------------------%<---------------------------------
ReflectionException

Method export::index() does not exist

/home/www_php/synalinq.com/limesurvey/application/core/Survey_Common_Action.php(96)

084 // Check if the method is public and of the action class, not its parents
085 // ReflectionClass gets us the methods of the class and parent class
086 // If the above method existence check passed, it might not be neceessary that it is of the action class
087 $oMethod = new ReflectionMethod($this, $sSubAction);
088
089 // Get the action classes from the admin controller as the urls necessarily do not equal the class names. Eg. survey -> surveyaction
090 $aActions = Yii::app()->getController()->getActionClasses();
091
092 if(empty($aActions[$this->getId()]) || strtolower($oMethod->getDeclaringClass()->name) != strtolower($aActions[$this->getId()]) || !$oMethod->isPublic())
093 {
094 // Either action doesn't exist in our whitelist, or the method class doesn't equal the action class or the method isn't public
095 // So let us get the last possible default method, ie. index
096 $oMethod = new ReflectionMethod($this, $sDefault);
097 }
098
099 // We're all good to go, let's execute it
100 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
101 return parent::runWithParamsInternal($this, $oMethod, $params);
102 }
103
104 /*
105
Some functions have different parameters, which are just an alias of the
106 usual parameters we're getting in the url. This function just populates
107
those variables so that we don't end up in an error.
108 *

Stack Trace
#0

/home/www_php/synalinq.com/limesurvey/application/core/Survey_Common_Action.php(96): ReflectionMethod->__construct(export, "index")

091
092 if(empty($aActions[$this->getId()]) || strtolower($oMethod->getDeclaringClass()->name) != strtolower($aActions[$this->getId()]) || !$oMethod->isPublic())
093 {
094 // Either action doesn't exist in our whitelist, or the method class doesn't equal the action class or the method isn't public
095 // So let us get the last possible default method, ie. index
096 $oMethod = new ReflectionMethod($this, $sDefault);
097 }
098
099 // We're all good to go, let's execute it
100 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
101 return parent::runWithParamsInternal($this, $oMethod, $params);

#1
+
/home/www_php/synalinq.com/limesurvey/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("r" => "admin/export/quexml/surveyid/63999", "quexml" => "surveyid", 63999 => ""))
#2
+
/home/www_php/synalinq.com/limesurvey/framework/web/CController.php(286): CController->runAction(export)
#3
+
/home/www_php/synalinq.com/limesurvey/framework/web/CController.php(265): CController->runActionWithFilters(export, array())
#4

/home/www_php/synalinq.com/limesurvey/application/controllers/AdminController.php(160): CController->run("export")

155 $this->redirect(array('/admin/authentication/sa/login'));
156 }
157
158 }
159
160 return parent::run($action);
161 }
162
163 /*
164
Routes all the actions to their respective places
165 *

#5
+
/home/www_php/synalinq.com/limesurvey/framework/web/CWebApplication.php(282): AdminController->run("export")
#6
+
/home/www_php/synalinq.com/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/export/quexml/surveyid/63999")
#7
+
/home/www_php/synalinq.com/limesurvey/framework/base/CApplication.php(185): CWebApplication->processRequest()
#8

/home/www_php/synalinq.com/limesurvey/index.php(212): CApplication->run()

207 die (sprintf('%s should be writable by the webserver (766 or 776).', $runtimePath));
208 }
209 }
210
211 Yii::$enableIncludePath = false;
212 Yii::createApplication('LSYii_Application', $config)->run();
213
214 / End of file index.php /
215 / Location: ./index.php /
--------------------------------------%<---------------------------------
Thank you so much for your advice!
Chris

LouisGac

LouisGac

2016-06-07 17:14

developer   ~39301

Last edited: 2016-06-07 17:14

sure, just wait for the next release ;-)

c_schmitz

c_schmitz

2016-06-13 12:27

administrator   ~39490

Version 2.50 Build 160613 released

Related Changesets

LimeSurvey: master 77f3eefd

2016-06-07 15:04:43

LouisGac

Details Diff
Fixed issue 11304: PDF export function: (queXML PDF-Export) not working Affected Issues
11304
mod - application/controllers/admin/export.php Diff File
mod - application/views/admin/survey/surveybar_view.php Diff File

Issue History

Date Modified Username Field Change
2016-05-31 09:19 gstachl New Issue
2016-05-31 09:19 gstachl File Added: limesurvey_survey_159885.lss
2016-05-31 09:39 c_schmitz Note Added: 39042
2016-05-31 09:44 c_schmitz Note Edited: 39042
2016-05-31 09:44 c_schmitz Assigned To => c_schmitz
2016-05-31 09:44 c_schmitz Status new => feedback
2016-05-31 10:10 gstachl Note Added: 39043
2016-05-31 10:10 gstachl Status feedback => assigned
2016-05-31 10:18 c_schmitz Note Added: 39044
2016-05-31 10:18 c_schmitz Status assigned => feedback
2016-05-31 10:29 gstachl Note Added: 39045
2016-05-31 10:29 gstachl Status feedback => assigned
2016-05-31 10:32 gstachl Note Edited: 39045
2016-06-07 17:04 LouisGac Changeset attached => LimeSurvey master 77f3eefd
2016-06-07 17:04 LouisGac Note Added: 39297
2016-06-07 17:04 LouisGac Assigned To c_schmitz => LouisGac
2016-06-07 17:04 LouisGac Resolution open => fixed
2016-06-07 17:05 LouisGac Status assigned => resolved
2016-06-07 17:07 chlarsen Note Added: 39299
2016-06-07 17:07 chlarsen Issue Monitored: chlarsen
2016-06-07 17:14 LouisGac Note Added: 39301
2016-06-07 17:14 LouisGac Note Edited: 39301
2016-06-13 12:27 c_schmitz Note Added: 39490
2016-06-13 12:27 c_schmitz Status resolved => closed
2021-08-03 18:07 guest Bug heat 8 => 10