Tabbie2 icon indicating copy to clipboard operation
Tabbie2 copied to clipboard

Outround PDF generator

Open chief-nerd opened this issue 7 years ago • 2 comments

[Sun Jul 23 14:27:59 2017] [warn] [client 94.119.64.12] mod_fcgid: stderr: PHP Fatal error: Class 'frontend\controllers\Pdf' not found in /var/www/virtual/tabbie/tabbie2/tabbie2.git/frontend/controllers/OutroundController.php on line 188, referer: https://www.tabbie.org/imperial-iv--1/outround/1744

chief-nerd avatar Aug 15 '17 08:08 chief-nerd

Could it just be that OutroundController.php is missing these imports: use kartik\mpdf\Pdf; use mPDF;

(These are the PDF-related imports from RoundController.php and aren't (as far as I can tell) in any way passed or included for OutroundController.php)

SteRoy avatar Nov 18 '17 17:11 SteRoy

UPDATE

Have just tested on a local version. The Class 'frontend\controllers\Pdf' is resolved if you append 'use kartik\mpdf\Pdf;' 'use mPDF;' to OutroundController.php

This provokes another error explaining that the template files are missing. Copying _ballotTemplate.php and ballots.php from /frontend/views/round to /frontend/views/outround resolves this error and allows functional printing of ballots.

SteRoy avatar Nov 18 '17 18:11 SteRoy