PDF-Link is not generated correctly

Phoca PDF - creating PDF documents in Joomla! CMS
s0801634
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 27 Nov 2009, 14:28

PDF-Link is not generated correctly

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF-Link is not generated correctly

Post by Jan »

Did you try to change the settings in Components -Phoca PDF - Plugins - Content Plugin - PDF folder: SEF (Add Suffix) Enabled ?
If you find Phoca extensions useful, please support the project
s0801634
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 27 Nov 2009, 14:28

Re: PDF-Link is not generated correctly

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF-Link is not generated correctly

Post 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(.*)

:-(
If you find Phoca extensions useful, please support the project
s0801634
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 27 Nov 2009, 14:28

Re: PDF-Link is not generated correctly

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF-Link is not generated correctly

Post by Jan »

Great to hear it. Thank you for this information. Jan
If you find Phoca extensions useful, please support the project
Clemens-x
Phoca Member
Phoca Member
Posts: 12
Joined: 08 Dec 2009, 21:09

Re: PDF-Link is not generated correctly

Post 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
Post Reply