Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Broken PDF attachment 1 year 10 months ago #26107

  • HerKle
  • HerKle's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Style is poor man's basic right
  • Posts: 159
  • Thank you received: 28
This topic was already part of a two-themes-topic:
https://www.joomlaeventmanager.net/forum/jem-2-2-x-on-joomla-3/10277-how-to-delete-an-attachment-why-is-pdf-broken?start=6 – but it lost being followed. So I take it up again:

Which 3rd part plugin can be responsible for this change of pdf content?

Original pdf file:

This browser does not support PDFs. Please download the PDF to view it: Download PDF



PDF file opened as JEM Event Detail attachment:

This browser does not support PDFs. Please download the PDF to view it: Download PDF



Thx again,
Regards,
Herbert
Attachments:

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

Broken PDF attachment 1 year 10 months ago #26110

It may be something to do with how JEM streams attachments. I had a similar problem and ended up replacing call to JS function with simple link.
See this topic for more details www.joomlaeventmanager.net/forum/jem-2-2...ements?start=6#25993
The following user(s) said Thank You: HerKle

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

Broken PDF attachment 1 year 10 months ago #26111

  • HerKle
  • HerKle's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Style is poor man's basic right
  • Posts: 159
  • Thank you received: 28
Luckily, this did help me. I just had to consider the responsive version of the file to amend:
/components/com_jem/common/views/tmpl/default_attachments_responsive.php

Replacing the lines 37 and 38 by
$attribs	= array('class'=>'file-name','target'=>'_blank');
echo JHtml::_('link',str_replace(JPATH_SITE, "", JEMAttachment::getAttachmentPath($file->id)),$image,$attribs);

and using it in template override
templates/mytemplate/html/com_jem/common/default_attachments_responsive.php

made the downloads work. Thanks, depebo!
Regards,
Herbert

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

Last edit: by HerKle.

Broken PDF attachment 1 year 10 months ago #26112

As far as I am aware there is no file content manipulation on upload of file (only file name is changed and sanitised).
JFile::upload
method of Joomla! is used.
Is it definitely corrupted during upload? - i.e. you have located and downloaded the file directly using FTP to compare with the original.

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

Broken PDF attachment 10 months 3 weeks ago #26991

  • HerKle
  • HerKle's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Style is poor man's basic right
  • Posts: 159
  • Thank you received: 28
Hi there,
thanks for integrating responsive design into JEM 2.3.x!

Unfortunately, PDF showed broken again - but thx to depebo and his trick described in this post pdf download worked again.

I only had to make a new template overidde into mytemplate/html/com_jem/common/responsive/default_attachment.php

Double thank now to depebo!
Regards,
Herbert

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

  • Page:
  • 1
Time to create page: 0.429 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......