- Posts: 66
- Thank you received: 1
Kunena 6.2.6 released
The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2
Question PDF handling seems broken in 5.1.5
since I upgraded to 5.1.5 with PHP 7.2 and current Joomla version attached PDFs cannot be opened any more. The URL points to
media/kunena/attachments/<userid>/<real filename> and end up in error 404
In my understanding they should be something like
.../attachment/<attachmentID> as it is also shown on images. Manually using that link works.
Something seems wrong with $attachment->getURL method . It happens in attachment info, attachment button and in embedded link in post text.
Second issue: What is also strange is that Kunena claims that current Firefox with embedded PDF viewer would not support PDFs. I can definitely read PDF on other systems within Firefox. This error is already around for a while. I think it was introduced with 5.1 .
It would be great if you could fix this.
Thanks for your great work!
Best regards, Goldie
Please Log in or Create an account to join the conversation.
I only added:
2) Which browser version do you use, also which os.
Firefox are removing/disabling some features like rss and other stuff of the next version 64
Please Log in or Create an account to join the conversation.
In my understanding they should be something like
.../attachment/<attachmentID> as it is also shown on images. Manually using that link works."
We need to use the real name on embed, because html5 embed needs a file extension, like .pdf to show up. It can't read the protected url. That's why I have added it.
But yes the bottom link should get the protected attachment, looks like it its getting the wrong inline value. I will check the issue
Please Log in or Create an account to join the conversation.
thanks for your quick reply. Yes this PDF is embedded in post.
I use Win 7 with current Firefox 62.0.3 64 Bit. I have just tried IE 11 and the attachment buttons also go to /media/... . But it shows PDF inline and I can read that PDF. On Firefox it does not show inline PDF but it shows
This browser does not support PDFs. Please download the PDF to view it:
followed by the same link that does not work. Now before you ask: Yes Firefox does have a PDF viewer and that works on other websites. I can open complete PDF files there and read them in FF without opening Adobe Reader. But I never have the effect of a builtin PDF viewer in a subwindow as in IE.
So as I again can only follow the link, no chance to open the PDF attachment.
Please Log in or Create an account to join the conversation.
I changed back your mod in libraries/kunena/attachment/attachment.php and yes I can open attachments via buttons below post or via "Download PDF" again.
Now it would be great if you could also give me a solution for viewing embedded PDFs on Firefox.
I also understand your troubles with the link naming. If HTML5 wants a link which ends in .pdf then there is no actual file behind it as all attachments have encoded filenames without a file ending.
Please Log in or Create an account to join the conversation.
Please check the console (f12) and copy here the error message.
Please Log in or Create an account to join the conversation.
I do not have embed working in Firefox, only in IE. For Firefox it always comes with
This browser does not support PDFs. Please download the PDF to view it: Download PDF
And the link of "Download PDF" also went to same wrong destination. That's why I wrote it would be nice to have a fix for that missing embed on FF too,
And thanks, I will download the nightly build and test it.
Please Log in or Create an account to join the conversation.
I think I start to understand: Firefox has a built in browser but no entry in application/pdf . And that is what Kunena looks for. Now I need to find out how to add this entry to FF application list.
Please Log in or Create an account to join the conversation.
support.mozilla.org/nl/questions/1103456
if not working:
support.mozilla.org/en-US/kb/application...irefox-handles-files
Please Log in or Create an account to join the conversation.
thanks again for your help and links. But nothing worked. I had already erased handlers.json and reassured that PDF handling via internal viewer was set to standard.
Now I have made a test and put the code of bbcode/pdf.php into an HTML Joomla article. I only replaced $location with a fixed file name ending in ".php" . And what shall I say it worked! So for me it looks like Firefox is simply not opening a file not ending with ".pdf" in its internal pdf.js Browser.
Here my small article
<h2>This is a PDF test</h2>
<object class="pdf" data="images/dummy.pdf" type="application/pdf" width="100%" height="auto" style="min-height: 300px;">
<embed src="images/dummy.pdf">
This browser does not support PDFs. Please download the PDF to view it: <a href="<?php echo $location; ?>">Download
PDF</a>
</object>
[strike]I also did the test to use filename "dummy" instead of "dummy.pdf" and again it failed. Sorry for creating that headache to you. But you already knew that it would be trouble not to have ".pdf" in HTML5. In the end it means that you have to create a <whatever.pdf> and then open the link to embed it. Or even better: Just append ".pdf" to all random attachment names.[/strike]
SORRY, I made a mistake and forgot folder name. So it works also with file name "images/dummy". But now I am lost why it would not work inside Kunena.
Please Log in or Create an account to join the conversation.