Pdf creation "sometimes" not working

Phoca PDF - creating PDF documents in Joomla! CMS
oorzaak
Phoca Member
Phoca Member
Posts: 47
Joined: 11 Dec 2008, 00:37

Pdf creation "sometimes" not working

Post by oorzaak »

Hi,

Some time ago I created a button for Phoca Pdf in a module position. I discussed this on this forum, in this topic: viewtopic.php?f=37&t=25643.

After some time now, it is not always working correctly anymore:
- Creating a pdf using the button consistently does not work. A pdf window is opened and the footer that I added is there, but there's no content.
- However, manually adding "?tmpl=component&format=pdf" to the url - which is exactly what the button does - sometimes does result in a pdf with content and sometimes it doesn't - with THE SAME articles! It even seems that creating a pdf of a specific article by manually changing the url will stop working after I clicked the button once. But I'm not sure that this is a consistent pattern.
- Also I made a copy of the site and restored it locally. Locally, pdf creation is working ok, both with the button and manually.

At first it seemed to me that the button stopped working after updating Joomla. But is looks more like there is an issue regarding the (connection to) the live site.

Do you have any ideas as to how to solve this?

Kind regards, Frits
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Pdf creation "sometimes" not working

Post by Jan »

Hi, really no idea, yes, when you update the site, it should be updated the button too. When you mouse over the button, do you get the right link? The right link should include ?tmpl=component&format=pdf

like here on demo page:
https://www.phoca.cz/joomla3demo/phoca-pdf-demo ==> https://www.phoca.cz/joomla3demo/phoca-p ... format=pdf

Jan
If you find Phoca extensions useful, please support the project
oorzaak
Phoca Member
Phoca Member
Posts: 47
Joined: 11 Dec 2008, 00:37

Re: Pdf creation "sometimes" not working

Post by oorzaak »

Hi Jan,

I found out that this issue is due to server side caching. In the Joomla back end:

System > Global configuration > System tab > Cache settings

These were set to:

- Cache: On - Conservative caching
- Cache handler: File
- Cache time: 30

I found out because I noticed a pattern that I failed to notice before: I could create a correct pdf of a selected article just once but not repeatedly during a (testing) session. And when returning to the site a day later, this pattern started over again. After disabling caching, pdf creation is ok, also when repeatedly creating a pdf of the same article during the same session.

I hope that you can reproduce the issue now we know this. And it would be even nicer if you could find a way to tackle this so that we can have both dpf creation and caching on one site :wink: I'm leaving caching disabled on this site now.


Kind regards, Frits
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Pdf creation "sometimes" not working

Post by Jan »

Hi, hmm, this is unfortunately something, I cannot change - the cache is working for the article, so everything in Joomla! so this needs to be solved in Joomla! and I really don't have any experiences with Joomla! core cache :-(

Did you try to use any other solution for cache, e.g.: http://www.jotcomponents.net/web-programming/jotcache/

Jan
If you find Phoca extensions useful, please support the project
oorzaak
Phoca Member
Phoca Member
Posts: 47
Joined: 11 Dec 2008, 00:37

Re: Pdf creation "sometimes" not working

Post by oorzaak »

Hi Jan,

I understand that you cannot solve this.

I never used Jotcache before; this is a good reason to check it out. I'll try not to forget to report here what the results are.


Kind regards, Frits
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Pdf creation "sometimes" not working

Post by Jan »

Ok, will be great, thank you, Jan
If you find Phoca extensions useful, please support the project
Post Reply