PDF only on some pages + PDF generated only once

Phoca PDF - creating PDF documents in Joomla! CMS
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF only on some pages + PDF generated only once

Post by Jan »

Hi,
what happens when you disable ACE SEF and switch to standard core SEF in Joomla!?

Jan
If you find Phoca extensions useful, please support the project
mattiz
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Nov 2013, 10:01

Re: PDF only on some pages + PDF generated only once

Post by mattiz »

Jan wrote:Hi,
what happens when you disable ACE SEF and switch to standard core SEF in Joomla!?

Jan
Hi Jan!

1) I disabled ACE-SEF - the result is the same
2) I disabled (Extensions –> Plugin Manager –> System – Cache) - the result is the same
3) I disable Global Configuration –> Cache Settings - pdf saved each time
4) I included (Extensions –> Plugin Manager –> System – Cache) - pdf saved each time
5) I included (Extensions –> Plugin Manager –> System – Cache) + ACE-SEF - pdf saved each time

But if you turn again Global Configuration –> Cache Settings , pdf are reserved only once. Do I need to include it on the site? Or you can use only Plugin Manager –> System – Cache. Is it critical?

And another question. Saved to PDF files on the server, so that every time they do not generate PhocaPDF?

thanks in advance!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF only on some pages + PDF generated only once

Post by Jan »

Hi, for now there is no such option, to save the PDF on the server, for this some chache feature needs to be done, but such cache feature needs to check if something changed in the content/PDF to not display allways the old document :idea:


For now, if there is a problem with cache, it means the document is wrongly rendered, you can disable the cache in plugin options, this means, it is an extra feature, to run cache on your site but disable it for pdf documents (as written only in cases, there is a problem with cache rendered documents :-( )

Jan
If you find Phoca extensions useful, please support the project
mattiz
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Nov 2013, 10:01

Re: PDF only on some pages + PDF generated only once

Post by mattiz »

Jan, I turned off the cache in the settings PhocaPdf - NO. All the same, the situation is the same. The first time after cleaning the cache com_content pdf is created correctly, and following times clean sheet with header and footer.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF only on some pages + PDF generated only once

Post by Jan »

Hmm, then somehow this settings is not working correctly. As if you disable it, it in fact should ignore the global configuration settings - but maybe, there problem is deeper, means, there are no data sent from com_content to the Phoca PDF to render it :idea: For this some development research needs to be done, if the PDF component or plugin gets the data from com_content at all. :idea:
If you find Phoca extensions useful, please support the project
mattiz
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Nov 2013, 10:01

Re: PDF only on some pages + PDF generated only once

Post by mattiz »

Hi! I found the problem. It was a plug-in EasyCalcChech PLUS.

But this plugin way to hide my admin panel and protected from SQL queries. Perhaps in SQL queries is the problem?? The plugin did not miss a call from PhocaPDF?

Now my admin panel is the standard ussing address and is not protected. You will not prompt in this matter?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF only on some pages + PDF generated only once

Post by Jan »

Hi, maybe some customization will help - to not lose the protection :idea:

Jan
If you find Phoca extensions useful, please support the project
mKoziak
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 31 Jan 2017, 10:30

Re: PDF only on some pages + PDF generated only once

Post by mKoziak »

Sorry for digging in old topic, but I do have the same problem.
I'm using Joomla 3.6.5 with latest Phoca PDF (3.0.3).
Due too many articles (32 000 and counting) I was forced to use Joomla cache and this is the place that makes the problem.
I have exac copy of that page and PDF were fine, but after enabling cache everything has gone wrong.

When I use link for the first time (after clearing cache) it works just fine, but secend go did render empty page with title only.

I'm afraid this is becouse of cache, and You won't be able to change that.
But maybe using your own cache that will stay as long as system cache would solve the problem.

Best regards,
Michał
mKoziak
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 31 Jan 2017, 10:30

Re: PDF only on some pages + PDF generated only once

Post by mKoziak »

I have found the solution.
in component/com_content/controller.php file (yes, I know it is core file)
put those lines:
if( $this->input->get('format', 'html') == 'pdf')
$cachable = false;

Just before
parent::display($cachable, $safeurlparams);

The better solution would be if the pdf link woluld direct to Your component and this component would do the job.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: PDF only on some pages + PDF generated only once

Post by Jan »

Hi, unfortunately, it cannot link direct to Phoca PDF as it displays the article output.

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