404 error when trying to access the .pdf

Paul G
Paul G
Offline
0
Hi,

I have successfully installed Invoice Manager with dompdf, but when I click the .pdf icon it doesn't load or work. I get a 404 error 'not found'.

This suggest to me that the .pdf isn't being created. magic_quotes_gpc is OFF so that is no the problem...

Please can someone help


Thanks
Paul
Responses (9)
  • Accepted Answer

    Wednesday, October 30 2013, 04:21 PM - #Permalink
    0
    it is possible that is related to SEF.
    if you disable SEF, do you get this error?
    The reply is currently minimized Show
  • Accepted Answer

    Paul G
    Paul G
    Offline
    Wednesday, October 30 2013, 04:28 PM - #Permalink
    0
    no SEF is working fine...

    http://www.rinatomedia.com/clients/my-invoices/4-2013-3.dompdf sample URL which gives teh 404 error

    I even create a brand new invoice since installing dompdf and the problem is the same...
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 30 2013, 04:31 PM - #Permalink
    0
    yes, it's the "suffix" option for URLs with joomla that sometimes can give problems.
    if you mantain SEF, but disable suffixes, it should be enough.
    if you need the suffixes, then we can skip this issue by simply "avoiding" the SEF urls for PDF links.
    The reply is currently minimized Show
  • Accepted Answer

    Paul G
    Paul G
    Offline
    Wednesday, October 30 2013, 05:05 PM - #Permalink
    0
    Hi,

    I've just tried that and it still doesn't seem to work...

    It also doesn't work if I take the 'dom' bit out of the url so it reads: http://www.rinatomedia.com/clients/my-invoices/4-2013-3.pdf

    If I hover over the .pdf icon and click 'Save Link As' it doesn't seem to be able to download anything either.

    I'm using Joomla's core SEF Links, how do I 'avoid' the sef urls for pdf links?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 30 2013, 05:07 PM - #Permalink
    0
    hello,

    but have you tried disabling the "suffix" option on joomla global sef configuration? I didn't mean to simply strip that part on the URL (nor change it to .pdf), but actually disabling it on options.
    The reply is currently minimized Show
  • Accepted Answer

    Paul G
    Paul G
    Offline
    Wednesday, October 30 2013, 05:11 PM - #Permalink
    0
    Ye i tried that .. so it takes off the .html on the URLs?

    I still face the same problem ..
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 30 2013, 05:14 PM - #Permalink
    0
    that's strange. well in taht case we will hve to go with the code tweak.
    it's in the file /components/com_invoices/helpers/helpers.php
    if you go to line 129 you will see this:

    else $url = JRoute::_('index.php?option=com_invoices&view=invoice&format=dompdf&id='.$id);


    you have to replace it for:

    else $url = $uri->root().'index.php?option=com_invoices&view=invoice&format=dompdf&id='.$id;
    The reply is currently minimized Show
  • Accepted Answer

    Paul G
    Paul G
    Offline
    Wednesday, October 30 2013, 05:33 PM - #Permalink
    0
    Thanks for the solution but that doesn't seem to work either. It just brings up a whitescreen...

    Is there a chance that there's is some java conflict or something?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 16 2014, 11:41 PM - #Permalink
    0
    I had same issue....

    If you choose to keep Joomla's Add Suffix option enabled in your global config.

    Then you'll want to edit your .htaccess file in your joomla site's root directory.

    Replace this line at the bottom of the .htaccess file under "Joomla Core SEF section"
    RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]

    Replace with:
    RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|dompdf|vcf|raw))$ [NC]

    by adding the dompdf to the rewrite condition the server should redirect to the appropriate pdf file allowing your viewer to download the pdf even though the URL will be displayed in the browser as filename.dompdf

    Hope that helps!
    The reply is currently minimized Show
Your Reply