Page 1 of 1

PDF-Link is not generated correctly

Posted: 27 Nov 2009, 14:42
by s0801634
Hi Jan, hi forum,

I`ve the following problem using PhocaPDF:

Clicking on a PDF-icon within article generates the following link:

http://www.tripguru.de/reiseziele/tript ... mat=[b]pdf[/b]

If PhocaPDF should be used I need a link like this:

http://www.tripguru.de/reiseziele/tript ... b]phocapdf[/b]

If I type the link/url manually I get a correct PhocaPDF...

Plugin is activated and the latest verion from your website
Joomla is 1.5.15
PHP is 5.2.11
Standard Joomla-Core-SEF is enabled, using mod_rewrite i enabled, url suffix is disabled. Tryed to make several changes in these settings but almost the same error...

Any idea?

Maybe I have to use mod-rewrite to change the PDF-urls by changing "pdf" into "phocapdf" but I don`t know how to write rewrite rules???

Thanks for this great extension, hope it will work on my site soon, too.


Kind regards from Detmold/Germany,

Michael


**************
http://www.tripguru.de

Re: PDF-Link is not generated correctly

Posted: 01 Dec 2009, 20:21
by Jan
Did you try to change the settings in Components -Phoca PDF - Plugins - Content Plugin - PDF folder: SEF (Add Suffix) Enabled ?

Re: PDF-Link is not generated correctly

Posted: 01 Dec 2009, 21:08
by s0801634
Hi Jan,

yes, I´ve tried several options: Joomla SEF off, pdf-plugin SEF enabled off, yes (.pdf) and yes(.pdf?) or Joomla SEF onandtried the three option in your plugin,I´ve changed the order of the Joomla system plugins - put phoca plugin to the first and last position but always the same...

Thanks,
Michael

Re: PDF-Link is not generated correctly

Posted: 02 Dec 2009, 15:53
by Jan
seems like there is some problem in the url which caused not finding it, but this should not be problem:

format=pdf

as this should be found by this:

(.*)format=pdf(.*)

:-(

Re: PDF-Link is not generated correctly

Posted: 04 Dec 2009, 13:39
by s0801634
Hi Jan,

I´ve solved the problem by using rewrite rules on my apache :o

I´ve just modified my .htaccess by adding these two little lines:

Code: Select all

RewriteCond %{QUERY_STRING} ^(([^&]*&)*)format=pdf(&.*)?$ 
RewriteRule ^ %{REQUEST_URI}?%1format=phocapdf%3 [L,R=301]
Works perfect for me :D


Anyway, thanks again,
Michael

Re: PDF-Link is not generated correctly

Posted: 09 Dec 2009, 16:17
by Jan
Great to hear it. Thank you for this information. Jan

Re: PDF-Link is not generated correctly

Posted: 09 Dec 2009, 16:58
by Clemens-x
Hi!
On my fresh installed Joomla 1.5.15 I have installed Phoca-PDF, because of the superior quality of PDF-generation. For SEF-urls I have installed sH404SEF with .htaccess / rewrite. Right from the beginning, I have had the problem, that the URL for the PDFs are not generated correctly.
As the website had to go live with all that content, I have disabled all PDF-icons. Now there is time enough, to correct this issue. And so I have found this thread.

I have inserted the 2 lines in my .htaccess file at different positions, I have tried to switch the generation of the extension in Phoca PDF plugin, I have of course cleared the cache and deleted all the SEF-URLs concerning the links to generate PDFs and so on.
But with no effort! I always see the following urls:
1.) I call this webpage http://www.gessso.de/orga/datenschutz.html
2.) The link which is connected with the PDF-icon is:
http://www.gessso.de/pdf/orga/datenschutz.pdf
3.) When I click on it, the url will be redirected to the home page and
the homepage appears in a separate browser window.

Strange thing: According to the PDF-link on your Phoca-PDF demo site, I have used thsi url:
http://www.gessso.de/orga/datenschutz.h ... t=phocapdf
And immediately the PDF has been generated correctly and the browser asked me, whether to download it. So I see that Phoca is able to work. But the URLs are wrong.

This behaviour will keep constant regardless of the settings in the Phoca-PDF-plugin or the additional lines in .htaccess or purging SEF URLs in sH404SEF.
BTW: I have disabled the SEF-URL generation in sH404SEF for Phoca-PDF, but also without success.

How can I find out, what is going wrong here?
Kind regards
Clemens