shwoo Posted April 28, 2014 Share Posted April 28, 2014 Getting super frustrated with this one.... I've been troubleshooting this issue since I got my WHMCS licence a year or so ago. There are many mentions of this bug in threads but no valid solution anywhere! The VIEW PDF button on dmin/invoices.php?action=edit& redirects to the client login screen instead of showing a pdf. The DOWNLOAD PDF button also used to do this but I was able to fix it editing viewinvoice.tpl .... this template is now encrypted in the latest version so I'm totally locked out. Please advise fix for this asap. Thanks Link to comment Share on other sites More sharing options...
WHMCS Nate Posted April 28, 2014 Share Posted April 28, 2014 Shwoo, I am able to view a pdf invoice without issue from the admin interface on my 5.3.6 test installation. Can you open a ticket with our Technical Analysts so they can investigate this further? There may be a problem with redirects, or the system URL, or the php installation all of which can cause trouble rendering pdf's; but all of that depends on your local installation. Thanks for the report, Nate C Link to comment Share on other sites More sharing options...
davey Posted April 28, 2014 Share Posted April 28, 2014 This issue might be caused by your DNS. Are you sure you have added the rules below into your .htacces file? RewriteCond %{HTTP_HOST} ^www\.YOURHOST\.com$ RewriteRule ^/?$ "http\:\/\/YOURHOST\.com\/" [R=301,L] Kind regards, Davey Link to comment Share on other sites More sharing options...
shwoo Posted May 7, 2014 Author Share Posted May 7, 2014 Hi Davey, thanks for your reply. Sorry for the delay, I didn't get an email notification after subscribing to the thread. I tried putting that in the .htaccess file, no joy. I'll create a ticket. Thanks! Link to comment Share on other sites More sharing options...
cwispy Posted May 20, 2014 Share Posted May 20, 2014 I can confirm that I just updated from 5.2.16 to 5.3.7 and have the same error. A look at the source shows the urls as having the url ../dl.php which of course is sending the request down on level. <input type="button" value="Printable Version" class="button" onclick="window.open('../viewinvoice.php?id=13312','windowfrm','menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes,width=750,height=600')" /> <input type="button" value="View PDF" class="button" onclick="window.open('../dl.php?type=i&id=13312&viewpdf=1','pdfinv','')" /> <input type="button" value="Download PDF" class="button" onclick="window.location='../dl.php?type=i&id=13312'" /> Has a fix been released or is this in a template we can edit? Regards Shane Link to comment Share on other sites More sharing options...
WHMCS Nate Posted May 20, 2014 Share Posted May 20, 2014 Shane, So the code which generates a PDF invoice is shared between the client side and the admin side. The fact that it sends you down a level is expected. If that link is not working for you, please open a ticket so we can investigate your environment further and track down exactly what is going on there. Have a great day, Nate Link to comment Share on other sites More sharing options...
Recommended Posts