strange behavior. pdf void on second load

Phoca PDF - creating PDF documents in Joomla! CMS
nbit
Phoca Member
Phoca Member
Posts: 11
Joined: 02 Aug 2020, 11:03

Re: strange behavior. pdf void on second load

Post by nbit » 16 Sep 2020, 10:34

Hi Jan,
I have some difficulties to follow you cause the topic is too technical for my abilities.
Btw thanks for you replies, I will try to study it so I can better understand the problem.

I have one question, dunno if you already replied in your previous comments. First time I open a pdf it works correctly, that means that independently by the com_content article cache status, it is still able to call your script and generate the pdf at least for the first time. Since the second attempt I get the problem cause as far as I understand there is a cache uncompatibility.
Is it possible the first time the pdf is generated and your script is called for it, to wipe the cache for that file so it keeps generating the pdf?

I mean, when the first time the pdf is generated, something is added to the cache, can your script remove that something from the cache after generating it the first time? So com_content can act normally but we just remove the cache for the pdf so com_content will keep calling your script instead of using the cache cause it won't find the record in the cache?

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42872
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: strange behavior. pdf void on second load

Post by Jan » 17 Sep 2020, 11:46

Hi, this is the flow:

1) First time - Article component loads the data, render the page and ask if Phoca PDF wants to create PDF instead of HTML
2) Second time - Article component does not load the data, does not ask Phoca PDF and shows directly the cached content in HTML

So second time, Phoca PDF is just not even asked to do something, this is why it cannot influence this process :-(

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

nbit
Phoca Member
Phoca Member
Posts: 11
Joined: 02 Aug 2020, 11:03

Re: strange behavior. pdf void on second load

Post by nbit » 17 Sep 2020, 23:13

yes I had some clue about that,
so what I mean is, isn't it possible to do something on phase 1) for preventing the caching of the pdf view or to remove the cached record so in phase 2) com_content doesn't find the record in the cache and goes back to 1) ?

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42872
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: strange behavior. pdf void on second load

Post by Jan » 22 Sep 2020, 12:25

Hi,

seems like it is not possible to delete the cached file in phase one because it is written after Phoca PDF will do something. So the second idea to prevent from caching is the only chance. I tested this but didn't find any other place accepting the cache options as the com content controller. I will try to do more tests, but for now really no clue advice as the only one place to do, I found, was the com content controller :-(

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

nbit
Phoca Member
Phoca Member
Posts: 11
Joined: 02 Aug 2020, 11:03

Re: strange behavior. pdf void on second load

Post by nbit » 22 Sep 2020, 16:15

thanks Jan,
really appreciated, i will try to play around a little bit as well, I really would like to solve this issue cause i need both, pdf and cache.

Post Reply