×
Kunena 5.1.6.1 Released - Security Release (09 Nov 2018)

The Kunena team has announce the arrival of Kunena 5.1.6 [K 5.1.6] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1. This is a Security release.

K5.1.6.1 is a install update.

Solved PDF handling seems broken in 5.1.5

More
1 month 1 day ago - 1 month 1 day ago #1 by Goldie
Hi,

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
Last edit: 1 month 1 day ago by Goldie.

Please Log in or Create an account to join the conversation.

More
1 month 1 day ago #2 by 810
1) are those embedded?
I only added:
if ($protect && $inline && $this->isPdf()) 
		{ 
		$url = $this->folder . '/' . $this->filename_real; 
		}

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.

More
1 month 1 day ago #3 by 810
"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."

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.

More
1 month 1 day ago - 1 month 1 day ago #4 by Goldie
Hi,

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.
Last edit: 1 month 1 day ago by Goldie.

Please Log in or Create an account to join the conversation.

More
1 month 1 day ago #5 by Goldie
Hi,

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.

More
1 month 1 day ago - 1 month 1 day ago #6 by 810
ok have fixed the URL on normal (bottom message). But if you get 404 on embed then there is something else happinging. Could you check if the file exists. you can download the nightly build on the download page.

Please check the console (f12) and copy here the error message.
Last edit: 1 month 1 day ago by 810.

Please Log in or Create an account to join the conversation.

More
1 month 1 day ago #7 by Goldie
Hi,

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.

More
1 month 1 day ago #8 by Goldie
Hi again,

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.

More
More
1 month 1 day ago - 1 month 1 day ago #10 by Goldie
Hi,
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>


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.

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.
Last edit: 1 month 1 day ago by Goldie.

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Time to create page: 0.092 seconds