Page 1 of 1

PDF messed up with sh404SEF component

Posted: 13 May 2011, 14:44
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.

Re: PDF messed up with sh404SEF component

Posted: 16 May 2011, 23:59
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

Re: PDF messed up with sh404SEF component

Posted: 12 Jun 2011, 18:27
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!

Re: PDF messed up with sh404SEF component

Posted: 15 Jun 2011, 15:03
by Jan
Ok