×
Kunena 5.1.13 Released (21 Jul 2019)

The Kunena team has announce the arrival of Kunena 5.1.13 [K 5.1.13] 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.

Question pdf not loading in 5.1.5

More
9 months 3 weeks ago #1 by LauraRey
I've read several posts about this, but am not seeing a definitive explanation or fix.

When attaching a pdf as an attachment in a posting, it will not open or download. This happens when I insert a link for it or click the button for it.

If I clear the filetype attribute from the database table (kunena_attachments), it works fine.

We tested in Chrome 69.0.3497.100 on Mac and Windows.

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

More
9 months 2 weeks ago #2 by LauraRey
Replied by LauraRey on topic pdf not loading in 5.1.5
Actually, its the same issue in another thread.
". 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.
"

How do I fix this?

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

More
9 months 2 weeks ago #3 by Pinkeltje
Replied by Pinkeltje on topic pdf not loading in 5.1.5
This is the default path to attachements:
/media/kunena/attachments/user-id/filename.pdf
If not, there is something wrong with your installation or your browser. Test with Firefox.

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

More
9 months 2 weeks ago #4 by LauraRey
Replied by LauraRey on topic pdf not loading in 5.1.5
Yes. That is the correct path. The files in that location aren't listed by the filename_real, but rather the filename. For example:

Oct 26 18:41 929dcaa827fce41b577a850802f8c5ae and the filename_real is example.pdf

In the database, that corresponds to the correct filename_real value, but the url attempts to load

/media/kunena/attachments/user-id/example.pdf and it gives a 404 error

If I load this:

/media/kunena/attachments/user-id/929dcaa827fce41b577a850802f8c5ae

It loads fine.

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

More
9 months 2 weeks ago #5 by andy bonner
Just jumping in to say I am getting the exact same problem. Attachments have been working fine.. but users now getting these 404 errors when they try and open them.

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

More
9 months 2 weeks ago #6 by Pinkeltje
Replied by Pinkeltje on topic pdf not loading in 5.1.5
It's caused by enabling protect attachment in Kunena configuration. Might be a bug.

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

More
9 months 2 weeks ago #7 by LauraRey
Replied by LauraRey on topic pdf not loading in 5.1.5
Thanks. You are correct that disabling protect attachment does solve the problem with the 404. However, 'inserting" the attachment causes the pdf contents to be displayed where as previously, it inserted a link to the pdf.

Previously, the "application/pdf" wasn't added to the database. If I remove it, then everything works as my users desire. I may just find where the statement is that inserts the attachment and remove that field from the insertion.

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

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