Download PDF Email link

sunnyjey

Active Member
How do I provide URL Link to download PDF for the Detail view from Custom Template overiding ACL permission in Email?

I have form with custom Detail View Template (temple_custompdf). The redirect plugin directs to the Custom Template PDF after form submission.

Code:
index.php?option=com_fabrik&view=details&formid=5&rowid={rowid}&format=pdf

I have placed following URL code in the Message Text option of Email Form plugin

Code:
<a href="http://www.mywebsite.com/index.php?option=com_fabrik&view=details&formid=5&rowid={rowid}&format=pdf" target="_blank">Download Report</a>

The problem is that, when User clicks on the Download Report Link in Email, it downloads blank PDF with name joomla.pdf when User in not logged into the website. I guess this is due ACL permission access as the detail view of the Form is set to the Registered (UserID= {$my->id}) in Filter/Pre-filter.

Is there any way to bypass this ACL access and allow user to download the PDF without login into my website ?
 
Hmm, no, not if they are hitting a details link directly. That's kind of the whole point of ACL's, we don't allow bypassing them. :)

The only three options would be:

1) Attach the PDF (an option in the email plugin) rather than giving them a link to it.
2) Change the detail view ACL to allow Public
3) If you don't want the visible list to allow this, you could copy it, set ACL's on the copy, and use that formid in the link

-- hugh
 
1) Attach the PDF (an option in the email plugin) rather than giving them a link to it.
This is the ideal option. But Email plugin allows to attach PDF of Form and not Detail view. I have two separate custom templates for Form and Detail View. I wish there should be one extra option to attach Detail view in Email Plugin.

2) Change the detail view ACL to allow Public
I can't, due to obvious reasons.

3) If you don't want the visible list to allow this, you could copy it, set ACL's on the copy, and use that formid in the link
I will look into this.
 
This is the ideal option. But Email plugin allows to attach PDF of Form and not Detail view. I have two separate custom templates for Form and Detail View. I wish there should be one extra option to attach Detail view in Email Plugin.

Hmm, how recent is your code?

The email plugin's PDF attachment should be a detail view, using the form's configured PDF template. However, that code was broken until a few months ago.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top