PDF messed up with sh404SEF component

Phoca PDF - creating PDF documents in Joomla! CMS
sgagner
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 13 May 2011, 14:38
Location: Norrkoping, Sweden
Contact:

PDF messed up with sh404SEF component

Post by sgagner »

Hi,

I use sh404SEF on a website www.ungwebb.se and i also like to use Phoca PDF for printing PDF's from articles
However the PDF output is totally messed up when using sh404SEF. If I shut it off the output is perfect.
Do you intend to make a sh404SEF plugin to make the output better? I couldn't find any on your web.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF messed up with sh404SEF component

Post by Jan »

Hi, I don't know sh404SEF, I use the core SEF :-( :-( so this must be done by someone who know the SEF component :-(

Jan
If you find Phoca extensions useful, please support the project
bcoelho
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 12 Jun 2011, 17:54

Re: PDF messed up with sh404SEF component

Post by bcoelho »

Hi sgagner,

I had the same problem and followed these steps from sh404SEF's forum:

1 - Make sure your site is offline.
2 - On line 20 in your public_html/configuration.php file, set var $live_site = 'http://www.yoursite.com';
3 - Purge your urls in sh404SEF
4 - In sh404SEF Control Panel, click "Configuration" tab, click sh404SEF Configuration icon, click "Very adv." tab and change this from:

// if not 0, urls for pdf documents and rss feeds will be only partially turned into sef urls.
//The query string &format=pdf or &format=feed will be still be appended.
// This will protect against malfunctions when using some plugins which makes a call
// to JFactory::getDocument() from a onAfterInitiliaze handler
// At this time, SEF urls are not decoded and thus the document type is set to html instead of pdf or feed
// resulting in the home page being displayed instead of the correct document
$shDefaultParams['sh404SEF_PROTECT_AGAINST_DOCUMENT_TYPE_ERROR'] = 0;

to:

// if not 0, urls for pdf documents and rss feeds will be only partially turned into sef urls.
//The query string &format=pdf or &format=feed will be still be appended.
// This will protect against malfunctions when using some plugins which makes a call
// to JFactory::getDocument() from a onAfterInitiliaze handler
// At this time, SEF urls are not decoded and thus the document type is set to html instead of pdf or feed
// resulting in the home page being displayed instead of the correct document
$shDefaultParams['sh404SEF_PROTECT_AGAINST_DOCUMENT_TYPE_ERROR'] = 1;

5 - Clean your cache in Joomla.

This worked for me, good luck!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF messed up with sh404SEF component

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply