View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
12451Bug reportsImport/Exportpublic2018-01-30 14:29
Reporterlimesurveymsssi Assigned Toc_schmitz  
PrioritynoneSeveritytrivial 
Status closedResolutionfixed 
Product Version2.64.x 
Fixed in Version3.1.x 
Summary12451: Problem when One user export to pdf
Description

I have LimeSurvey (Version 2.64.7+170404 ) with php7 and MSSQL Server.

[Thu Jun 01 13:48:10.256254 2017] [:error] [pid 19692] [client 10.38.23.49:54803] PHP Notice: Undefined property: pdf::$getFontFamily in /var/www/html/limesurvey/application/libraries/admin/pdf.php on line 806, referer: http://vm-limesurvey-pre/limesurvey/index.php/printanswers/view/surveyid/646934
[Thu Jun 01 13:48:10.261062 2017] [:error] [pid 19692] [client 10.38.23.49:54803] PHP Notice: Undefined property: pdf::$getFontFamily in /var/www/html/limesurvey/application/libraries/admin/pdf.php on line 806, referer: http://vm-limesurvey-pre/limesurvey/index.php/printanswers/view/surveyid/646934
[Thu Jun 01 13:48:10.263196 2017] [:error] [pid 19692] [client 10.38.23.49:54803] PHP Notice: Undefined property: pdf::$getFontFamily in /var/www/html/limesurvey/application/libraries/admin/pdf.php on line 806, referer: http://vm-limesurvey-pre/limesurvey/index.php/printanswers/view/surveyid/646934

Steps To Reproduce

When I finish a survey, apply to send and export to pdf (the results), then I have this problema:

[Thu Jun 01 13:48:10.256254 2017] [:error] [pid 19692] [client 10.38.23.49:54803] PHP Notice: Undefined property: pdf::$getFontFamily in /var/www/html/limesurvey/application/libraries/admin/pdf.php on line 806, referer: http://vm-limesurvey-pre/limesurvey/index.php/printanswers/view/surveyid/646934

Before I had the versión 2.57 and "export to pdf" is fine.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)Version 2.64.7+170404
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMSSQL SERVER
Server OS (if known)RHEL 7.3
Webserver software & version (if known)IE
PHP VersionPHP 7.0

Users monitoring this issue

There are no users monitoring this issue.

Activities

limesurveymsssi

limesurveymsssi

2017-06-01 16:23

reporter   ~43790

I have searched of FrontFamily:

[root@vm-limesurvey-pre application]# grep getFontFamily * -R
libraries/admin/pdf.php: $sFontFamily = $this->getFontFamily;
third_party/tcpdf/CHANGELOG.TXT: - Methods getFontFamily() and getFontStyle() were added.
third_party/tcpdf/tcpdf.php: public function getFontFamily() {
third_party/tcpdf/tcpdf.php: $dom[$key]['fontname'] = $this->getFontFamilyName($dom[$key]['style']['font-family']);
third_party/tcpdf/tcpdf.php: $dom[$key]['fontname'] = $this->getFontFamilyName($dom[$key]['attribute']['face']);
third_party/tcpdf/tcpdf.php: public function getFontFamilyName($fontfamily) {
third_party/tcpdf/tcpdf.php: $font_family = $this->getFontFamilyName($regs[1]);
third_party/tcpdf/tcpdf.php: $font_family = $this->getFontFamilyName($svgstyle['font-family']);

limesurveymsssi

limesurveymsssi

2017-06-01 17:35

reporter   ~43792

the tcpdf.php has:

/***************************************************************************
* PATH CONFIGURATION PARAMETERS
**************************************************************************/

/************************************************************
* TCPDF installation directory
* ----------------------------------------------------------
* This is the base installation directory for your TCPDF
* package (the folder that contains tcpdf.php).
*
* ADD TRAILING SLASH!
***********************************************************/

$tcpdf['base_directory'] = APPPATH.'third_party'.DIRECTORY_SEPARATOR.'tcpdf'.DIRECTORY_SEPARATOR;

##########################################################
##########################################################

And base_directory :

[root@vm-limesurvey-pre tcpdf]# ll
total 1204
-rwxrwxr-x 1 apache apache 116351 Apr 4 11:36 CHANGELOG.TXT
-rwxrwxr-x 1 apache apache 944 Apr 4 11:36 composer.json
drwxrwxr-x 2 apache apache 4096 Apr 4 11:36 config
drwxrwxr-x 7 apache apache 12288 Apr 4 11:36 fonts
drwxrwxr-x 3 apache apache 4096 Apr 4 11:36 include
-rwxrwxr-x 1 apache apache 43636 Apr 4 11:36 LICENSE.TXT
-rwxrwxr-x 1 apache apache 4767 Apr 4 11:36 README.md
-rwxrwxr-x 1 apache apache 7155 Apr 4 11:36 tcpdf_autoconfig.php
-rwxrwxr-x 1 apache apache 73406 Apr 4 11:36 tcpdf_barcodes_1d.php
-rwxrwxr-x 1 apache apache 14683 Apr 4 11:36 tcpdf_barcodes_2d.php
-rwxrwxr-x 1 apache apache 3327 Apr 4 11:36 tcpdf_import.php
-rwxrwxr-x 1 apache apache 27636 Apr 4 11:36 tcpdf_parser.php
-rwxrwxr-x 1 apache apache 897169 Apr 4 11:36 tcpdf.php ------------------------------------------> it has getFontFamilly()
drwxrwxr-x 2 apache apache 4096 Apr 4 11:36 tolos

So, I don't understand because I get this error.

kmsg

kmsg

2017-10-02 15:18

reporter   ~44535

Bonjour,

L'erreur vient du code du fichier, en effet, il manque des parenthèses à la fin de "$sFontFamily = $this->getFontFamily;".

Ce qui devrait donc être "$sFontFamily = $this->getFontFamily();".

Cordialement,

kmsg

kmsg

2017-10-02 15:21

reporter   ~44536

Hi,

This error is in the code itself "$sFontFamily = $this->getFontFamily;" instead of "$sFontFamily = $this->getFontFamily();".

Best regards.

c_schmitz

c_schmitz

2018-01-24 16:35

administrator   ~46030

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

Related Changesets

LimeSurvey: master f6c15fe2

2018-01-24 16:34:55

c_schmitz

Details Diff
Fixed issue 12451: Problem when user exports to PDF Affected Issues
12451
mod - application/libraries/admin/pdf.php Diff File

Issue History

Date Modified Username Field Change
2017-06-01 15:10 limesurveymsssi New Issue
2017-06-01 16:23 limesurveymsssi Note Added: 43790
2017-06-01 17:35 limesurveymsssi Note Added: 43792
2017-10-02 15:18 kmsg Note Added: 44535
2017-10-02 15:21 kmsg Note Added: 44536
2018-01-24 16:35 c_schmitz Changeset attached => LimeSurvey master f6c15fe2
2018-01-24 16:35 c_schmitz Note Added: 46030
2018-01-24 16:35 c_schmitz Assigned To => c_schmitz
2018-01-24 16:35 c_schmitz Resolution open => fixed
2018-01-24 16:35 c_schmitz Status new => resolved
2018-01-24 16:35 c_schmitz Fixed in Version => 3.0.x
2018-01-30 14:29 ollehar Status resolved => closed
2018-01-30 14:29 ollehar Fixed in Version 3.0.x => 3.1.x