View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|17541||Bug reports||Plugins||public||2021-08-25 14:13||2021-09-06 10:59|
|Summary||17541: pdf export via plugin impossible|
we are trying to create an pdf export plugin.
Unfortunately it isn't working because of a bug in the pdf.php.
The reason is that an undefined constant is used. It appears that ot doesn't work because of changes within the PHP language.
|Steps To Reproduce||Call the internal class ExportSurveyResultsService|
with the following parameters: $exportResponses($survey->sid, $survey->language, 'pdf, $formattingOptions, '').
It results in the attached error message.
|Tags||No tags attached.|
|Complete LimeSurvey version number (& build)||3.27.12+210816|
|I will donate to the project if issue is resolved||No|
|Database type & version||MySQL 8.0.21|
|Server OS (if known)||Windows 10|
|Webserver software & version (if known)||APache 2.4.46|
|Probably missing a PHP extension?|
No, your code is wrong - EXT is defined in index.php:
I have export plugin using current pdf function … but never use with command
We don't load index : https://github.com/LimeSurvey/LimeSurvey/blob/bdd2ff84d6bf436893044eae8efef207ebf2a97b/index.php#L119
We need to define all of this in command action too.
Pull request can be cool :)
> No, your code is wrong - EXT is defined in index.php:
OUR code is wrong … in my opinion.
|@ollehar: I agree with DenisChenu. It would be (at least in my opinion) better, if in the console environment the constants are provided as well. Of course we simply could define EXT, but this would mean that every plugin must define all the necessary constants. I don't believe that's a good idea.|
|Sure. Feel free to submit a pull request.|
> Pull request can be cool :)
for all command action in fact.
See : https://gitlab.com/SondagesPro/mailing/sendMailCron/-/blob/master/sendMailCron.php#L1593
And for 3.X : https://gitlab.com/SondagesPro/mailing/sendMailCron/-/blob/master/sendMailCron.php#L454
1. Lack of constant
2. lack of some common function loaded
3. Lack of some class loaded
4. surely other
@dschirge, if this doesn't take more than an hour, please provide a pull request and add this to my bill.
We need this for a project which should start soon but currenty we are unable to get the PDF export working.
As a temporary solution, can we simply define the missing constant(s) within out code (if not defined yet) to get this going?
I created a pull request.
You can find it here: https://github.com/LimeSurvey/LimeSurvey/pull/2025
It is my first pull request in GitHub so I hope I did it in the correct/expected way. If not please let me know what's wrong.
|@ollehar, please review.|
|@ollehar, would it be possible to include this at the next release so we can use it for our upcoming project beginning of September?|
|Sure, as soon as it's merged it will be included in the next patch (Monday) release.|
|You can just patch it locally before that (as long as you know it will be included in the next release, I mean).|
|Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=32624|
|Thank you for merging this! :-)|
|No probs, hope it works!|
LimeSurvey: 3.x-LTS dec4e2fa
Committer: GitHub Details Diff
|Fixed issue 17541: PDF export via plugin not possible (#2025)||
|add - application/commands/assets/.keep||Diff File|
|mod - application/commands/console.php||Diff File|
|mod - application/core/ConsoleApplication.php||Diff File|
|2021-08-25 14:13||dschirge||New Issue|
|2021-08-25 14:13||dschirge||File Added: image.png|
|2021-08-25 14:14||ollehar||Note Added: 66131|
|2021-08-25 14:14||ollehar||Bug heat||0 => 2|
|2021-08-25 14:19||ollehar||Note Added: 66132|
|2021-08-25 14:20||ollehar||Assigned To||=> ollehar|
|2021-08-25 14:20||ollehar||Status||new => feedback|
|2021-08-25 14:27||DenisChenu||Note Added: 66134|
|2021-08-25 14:27||DenisChenu||Bug heat||2 => 4|
|2021-08-25 14:27||DenisChenu||Note Added: 66135|
|2021-08-25 14:33||ollehar||Severity||block => tweak|
|2021-08-25 14:33||ollehar||Description Updated||View Revisions|
|2021-08-25 14:33||ollehar||Steps to Reproduce Updated||View Revisions|
|2021-08-25 14:55||dschirge||Note Added: 66136|
|2021-08-25 14:55||dschirge||Bug heat||4 => 6|
|2021-08-25 14:55||dschirge||Status||feedback => assigned|
|2021-08-25 15:01||ollehar||Note Added: 66137|
|2021-08-25 15:10||DenisChenu||Note Added: 66138|
|2021-08-25 23:21||Mazi||Note Added: 66147|
|2021-08-25 23:21||Mazi||Bug heat||6 => 8|
|2021-08-31 14:17||dschirge||Note Added: 66243|
|2021-08-31 14:22||Mazi||Note Added: 66244|
|2021-08-31 14:33||Mazi||Note Added: 66245|
|2021-08-31 14:35||ollehar||Note Added: 66246|
|2021-08-31 14:35||ollehar||Note Added: 66247|
|2021-09-01 13:38||Changeset attached||=> LimeSurvey 3.x-LTS dec4e2fa|
|2021-09-01 13:38||guest||Note Added: 66253|
|2021-09-01 13:38||guest||Bug heat||8 => 10|
|2021-09-01 15:19||dschirge||Note Added: 66262|
|2021-09-01 15:20||ollehar||Note Added: 66263|
|2021-09-01 15:20||ollehar||Status||assigned => resolved|
|2021-09-01 15:20||ollehar||Resolution||open => fixed|
|2021-09-06 10:59||c_schmitz||Status||resolved => closed|