Univention Bugzilla – Bug 36234
Reports can not be created
Last modified: 2015-02-04 15:56:31 CET
The PDF (Standard report) can not be created anymore. CSV report works. UMC shows the following error but the logfiles doesn't contain anything (both directory-reports*.log are empty). Report creation has failed The report could not be created. Details for the problems can be found in the log files.
Reference `LastPage' on page 2 undefined on input line 147. only happens for groups/group cn=Administrators german session.
Created attachment 6463 [details] log The UMC-Server clears all environment variables which is causing this issue. Attached is the logfile from pdflatex.
!pdfTeX error: /usr/bin/pdflatex (file ecbx0700): Font ecbx0700 at 600 not foun d
It seems that latex was missing a directory to save and load fonts from. Fix: Index: debian/python-univention-directory-reports.dirs =================================================================== --- debian/python-univention-directory-reports.dirs (Revision 0) +++ debian/python-univention-directory-reports.dirs (Revision 0) @@ -0,0 +1 @@ +var/cache/univention-directory-reports Index: modules/univention/directory/reports/document.py =================================================================== --- modules/univention/directory/reports/document.py (Revision 57133) +++ modules/univention/directory/reports/document.py (Arbeitskopie) @@ -125,8 +125,9 @@ cmd = ['pdflatex', '-interaction=nonstopmode', '-halt-on-error', '-output-directory=%s' % os.path.dirname(latex_file), latex_file] devnull = open(os.path.devnull, 'w') try: - if not subprocess.call(cmd, stdout=devnull, stderr=devnull): - if not subprocess.call(cmd, stdout=devnull, stderr=devnull): + envVars = {'HOME': '/var/cache/univention-directory-reports'} + if not subprocess.call(cmd, stdout=devnull, stderr=devnull, env=envVars): + if not subprocess.call(cmd, stdout=devnull, stderr=devnull, env=envVars): return '%s.pdf' % latex_file.rsplit('.', 1)[0] print >>sys.stderr, "error: failed to create PDF file" return None
Created attachment 6584 [details] patch
FYI, I needed to apply the following changes in order to make it work in my VM: > cmd = ['/usr/bin/pdflatex', '-interaction=nonstopmode', '-halt-on-error', '-output-directory=%s' % os.path.dirname(latex_file), latex_file] and > env_vars = {'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOME': '/var/cache/univention-directory-reports'} ... then it worked.
In reply to Johannes Keiser from comment #5) > Created attachment 6584 [details] > patch (In reply to Alexander Kläser from comment #6) > FYI, I needed to apply the following changes in order to make it work in my > VM: > > > cmd = ['/usr/bin/pdflatex', '-interaction=nonstopmode', '-halt-on-error', '-output-directory=%s' % os.path.dirname(latex_file), latex_file] > > and > > > env_vars = {'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOME': '/var/cache/univention-directory-reports'} > > ... then it worked. implemented the patch patch: r57567 univention-directory-reports (7.0.0-2) and added the above changes(comment #6), should work now r57668 univention-directory-reports (7.0.0-3) YAML: r57669
OK: reports can be created via UMC and CLI in DE+EN. YAML: OK
<http://errata.univention.de/ucs/4.0/77.html>