Closed sns-ck closed 10 months ago
@sns-ck I tested this with TYPO3 v11
and news v11
and I think it should be working. Can you please check the error log and provide additional information about the error?
Maybe the error is related to the PHP version used.
I can confirm this issue on TYPO3 12.4.8 with EXT:news v 11.2.0 and pdfviewhelpers:dev-main Error log shows
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Unable to get property "type" of non-object "getTSFE()". | RuntimeException thrown in file /xyz/vendor/symfony/expression-language/Node/GetAttrNode.php in line 86. Requested URL: [MYURL]/typo3/module/web/ts?token=--AnonymizedToken--&id=1
This seems to caused by EXT:pdfviewhelpers/Configuration/TypoScript/Extensions/News/setup.typoscript, line 1:
[getTSFE().type == 28032013]
According to https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Conditions/Index.html#gettsfe, we should better use the null-safe variant
[getTSFE()?.type == 28032013]
(or the traverse condition)
With this change pdf output is working here.
@DL1ndner Thank you very much for the analysis and suggesting a fix! I think we might have to go for [getTSFE() && getTSFE().id == 28032013]
for TYPO3 v11 compatibility though.
We have included the link for generating a PDF as described in the tutorial on the news detail pages, which has worked great with News Extension Versions 9.3 and 10.0.3 so far. After the upgrade to 11.1.2, however, this has changed and when calling up a detail page with ?type=28032013, only a white/empty page is rendered without using the custom template to generate the PDF view.
TYPO3 Version 11.5.30 PdfViewHelper Version: 2.5.0