- Posts: 4
- Thank you received: 0
Kunena 6.3.0 released
The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3
Question pdf not loading in 5.1.5
5 years 6 months ago #1
by LauraRey
pdf not loading in 5.1.5 was created 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.
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.
5 years 5 months 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?
". 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.
Less
More
- Posts: 340
- Thank you received: 36
5 years 5 months ago #3
by Pinkeltje
Replied by Pinkeltje on topic pdf not loading in 5.1.5
This is the default path to attachements:
If not, there is something wrong with your installation or your browser. Test with Firefox.
Code:
/media/kunena/attachments/user-id/filename.pdf
Please Log in or Create an account to join the conversation.
5 years 5 months 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.
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.
- andy bonner
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 0
5 years 5 months ago #5
by andy bonner
Replied by andy bonner on topic pdf not loading in 5.1.5
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.
Less
More
- Posts: 340
- Thank you received: 36
5 years 5 months 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.
5 years 5 months 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.
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.
Time to create page: 0.554 seconds