Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Question PDF handling seems broken in 5.1.5

More
7 years 6 months ago #204673 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
7 years 6 months ago #204674 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
7 years 6 months ago - 7 years 6 months ago #204676 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>


[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.
Last edit: 7 years 6 months ago by Goldie.

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

More
7 years 6 months ago #204678 by Goldie
And by changing bbcode/pdf.php as follows it both works in Firefox and IE. I changed your method of using attachment->mesid and directly use filename in folder attachments. Brute force and I am sure you can do better than my programming.

$attachment = $this->attachment;
// $location = $attachment->getUrl();
$location = "media/kunena/attachments/" . $attachment->userid . "/" . $attachment->filename;

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

More
7 years 6 months ago #204679 by 810
the different now is:
'media/kunena/attachments/984/Verzendinstructies.pdf'

vs image
'/develop/index.php?option=com_kunena&amp;view=attachment&amp;id=54&amp;format=raw&amp;Itemid=333'

OK so I need to fix that. but it is working fine for me. Need to check it.

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

Time to create page: 0.238 seconds