Jump to content

View PDF button directs to login page


shwoo

Recommended Posts

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

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

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

  • 2 weeks later...

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

  • 2 weeks later...

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

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated