JV-Extension Link Directory Conflict

Phoca PDF - creating PDF documents in Joomla! CMS
mattstahl
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 04 Jan 2011, 19:32

JV-Extension Link Directory Conflict

Post by mattstahl »

Thought you might be interested in the following response I received from the JV--Extensions people as respects blanked out pages I was receiving in that app. It's possible that there may be a spillover to other similar apps used by others in the general community, and Phoca pdf (and other extensions) is/are just too good to walk away from because of these. If you have any input or suggestions as respects a correction of the problem, I'm sure we'd love to hear them. Keep up the great work.

Forum Post exchange content:

Expected behaviour:

After JV-LD creates the output it gives it to Joomla. Joomla then, sends it to those plugins which have registered for OnAfterRender event. All plugins that have registered to this event process the output provided by JV-LD and then finally give it back to Joomla. Joomla then displays the processed output on the screen

Actual behavior in your site:

The JV-LD output is available in full as expected. Subsequently, Joomla sends it to those plugins which have registered for OnAfterRender event. All plugins that have registered to this event process the output provided by JV-LD and then finally give it back to Joomla. We find that, one of the plugins is emptying the output due to some reason. Joomla then gets the empty data and displays it on the screen. We are now trying to find out which plugin is causing this issue.

--------------------------------------------------------------------
Administrator

Products:VIP, JVPM Re: Directory Home Page is Blank

The issue seems to be happening when "Phoca PDF - Content" plugin is enabled. "Phoca PDF - Content" system plugin is invoked ion onAfterRender and seems to be doing lots of search and replace on the content passed to it. There seems to be problem in that plugin code, that causes the output to be empty.

Request you to check with developer of "Phoca PDF - Content" to get the plugin fixed. In the meantime, you may please disable this plugin and continue using JV-LD without any issues
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: JV-Extension Link Directory Conflict

Post by Jan »

Hi, yes this is a problem. Phoca PDF cannot modify links to PDF in articles with other way. There are only two ways:

- system plugin will try to search the link to PDF and try to replace it to Phoca PDF (used in Phoca PDF) (yes this can be time consuming)
- or user must by himself modify all the content default templates and correct the links from standard PDF to Phoca PDF

This behaviour is not used in Phoca PDF 2 (Joomla! 1.6) While installation Phoca PDF will try to add new files into the system (in Joomla! 1.6 there is no PDF function so this is easier). No system plugin is required.

So, for Joomla! 1.6 this is solved, for 1.5 this can be solved by not using the system plugin and modifying the content files by yourself.

Try to search Phoca Forum (there are some guides how to do it) or try to see the modifications guide for 1.6 (it should be similar to 1.5):

https://www.phoca.cz/documents/47-phoca- ... -and-usage (Custom Install)

Jan
If you find Phoca extensions useful, please support the project
mattstahl
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 04 Jan 2011, 19:32

Re: JV-Extension Link Directory Conflict

Post by mattstahl »

Mr. Jan,

Modified the icon.php and applied the Kloppo changes to stop the search as described in forum. Lo and behold, JV was fully functional! Phoca pdf appears to be installed properly, fonts are loaded, enabled the content plugin and adjusted settings. No errors evident anywhere. My site (lisms.org) continues to render standard pdfs, however, with plug-in tags (standard) still very much in evidence. Tried switching between tiny and JCE editors to no effect. Site is Joomla 1.5.22 with PHP 5.2.9. SEF is not currently configured or enabled.

Am I dense and just overlooking something simple? If you have moment and can take a quick and direct look look at my back-end setings, send me a PM. I'll donate $25 to your cause on the spot (win or lose, no coding required) and send you back an admin access. Would love to get it working, but have functionality if I can't.

Am amaxed at the thoroughness and professionalism of your responses on this forum and the unique quality of your handiwork. Keep it up. The Joomla world thanks you.

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

Re: JV-Extension Link Directory Conflict

Post by Jan »

Hi, did you check to disable the system plugin and hardcode the links to Phoca PDF?
If you find Phoca extensions useful, please support the project
mattstahl
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 04 Jan 2011, 19:32

Re: JV-Extension Link Directory Conflict

Post by mattstahl »

I was under the impression that that wasn't required if the site was not, like mine, configured for SEO, but I guess I'm mistaken. Is there a forum post here alread that can walk me and others like me through that process of hard coding URLs step-by-step. If so, can you point me to it? I also found a couple things about htaccess modifications, but again wasn't sure they applied to non-SEO sites. Does it?

The component set-up guide you have posted makes reference to files that are moved, copied and backed up as part of the installation, and recommends that the user verify that these changes have been applied, but it's very confusing to follow in its present form. Thought that might be part of the problem. Just a suggestion, but for the benefit of all here, it would be nice to have a summary directory listing of files or illustration of same in that section of here in the forum for verification purposes.

Thank you for your patient attention.
mattstahl
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 04 Jan 2011, 19:32

Re: JV-Extension Link Directory Conflict

Post by mattstahl »

Perhaps the light is coming on -- dimly. On reading down in your PDF installation documentation, I now see that there are sample code instructions for customizing the Joomla core template files, but the entire reference addresses a 1.6 installation. Two quick questions ...

1. Are you saying that the SAME changes would apply for 1.5?

2. Does it make a difference that I already applied the Kloppo and other changes described above? In other words, should I remove everything again, revert the icon.php change to its orginal form, re-install just the component, and then apply the template mods described in your docentation, or can I just apply the template mods as is?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: JV-Extension Link Directory Conflict

Post by Jan »

Hi,

1) not the SAME but SIMILAR (didn't test it really :-( )

2) Modifying the code is the best way as no system plugin will take resources, no other different solutions will take resources. Adding the links to Phoca PDF in articles is then really smooth solution which works fast.

Jan
If you find Phoca extensions useful, please support the project
mattstahl
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 04 Jan 2011, 19:32

Re: JV-Extension Link Directory Conflict

Post by mattstahl »

Proved too daunting a task for a novice to match up the patch files, so I went back to start and began again, specifically:

1. Striped, then reinstalled 1.09 component and 1.06 content plug-in
2. Changed icon.php from format=pdf to format=phocapdf
3. Changed all instances of preg_replace to str_replace in pdf plug-in per the Kloppo postings.
4. Enabled the content plug-in.
5. Added the HTACCESS rewrite instructions found elsewhere in this forum.
6. ENABLED SEF URL's and Apache re-write in global setting. Left add suffix off
7. Turned add SEF extension OFF in the plug-n pdf tab of the Phoca component's control panel.

Lo and behold, my "white" page problem with JV Link directory disappeared, and Phoca was operational.

Last three items on the list appeared to be the keys in my particular case at least. While this combination of switches and patches doesn't apparently work with non-SEF URL's, at least for me, life's a trade-off.

The only small glitch remaining is the fact that third-party plug-in styling code (standard) shows in the pdf whether I set the "display code" switch either way to yes or no. While I can live with that, if you or anyone on this forum have any thoughts on getting rid of them, I'd love to hear them.

You've been wonderfully supportive. Hope this summation helps someone here.

Joomla 1.5.22, PHP 5.2.9
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: JV-Extension Link Directory Conflict

Post by Jan »

Hi, maybe the plugin code is in other format as it is checked, check the plugin code and maybe replace the plugin removing:

Code: Select all

if ($content->display_plugin == 0) {
            $pattern         = '/\{(.*)\}/Ui';
            $replacement     = '';
            $documentOutput = preg_replace($pattern, $replacement, $documentOutput);
            
        } 
If you find Phoca extensions useful, please support the project
mattstahl
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 04 Jan 2011, 19:32

Re: JV-Extension Link Directory Conflict

Post by mattstahl »

Removing this section had no effect at all, but I noticed that this was one of the sections where I had previously replaced the preg_replace with str_replace. When I switched it back, the code disappeared. I'm willing to bet that the same will apply for images, but now I know what to change and where to look if that's the case. I'm in good shape thanks to you, Jan! Three cheers.
Post Reply