Tags does not work anymore after installing Phoca open graph

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
kazemgh
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 19 Jul 2016, 14:38

Tags does not work anymore after installing Phoca open graph

Post by kazemgh »

Hi
I have some menu Items based on tags. but they stops working after installing Phoca open graph with this error:

Code: Select all

Fatal error: Call to a member function get() on null in /home/microna1/public_html/plugins/content/phocaopengraph/phocaopengraph.php on line 245
this happens when I click on tags below articles too.
any chance to make it right!? :(

here is a sample link to error page:
http://micronarrative.ir/index.php/archive/1350s.html

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

Re: Tags does not work anymore after installing Phoca open graph

Post by Jan »

Hi, which version of the plugin you run, can you paste a link without SEF, so I can test in on my test server.

On the row, there is this code:
$this->params->get

which is standard code to get the plugin params, for example:
plugins\content\loadmodule\loadmodule.php
$style = $this->params->def('style', 'none');

:idea:

Jan
If you find Phoca extensions useful, please support the project
kazemgh
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 19 Jul 2016, 14:38

Re: Tags does not work anymore after installing Phoca open graph

Post by kazemgh »

Thank you for reply :)

Here is same link without SEF:
clicking on a tag menu item:
http://micronarrative.ir/index.php?opti ... Itemid=324

cliking on same tag link below article:
http://micronarrative.ir/index.php?opti ... Itemid=324
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Tags does not work anymore after installing Phoca open graph

Post by Jan »

Hi, than you very much for the info:

Please open:

and change
FROM:

Code: Select all

if ($app->getName() != 'site') { return;}
TO:

Code: Select all

if ($app->getName() != 'site') { return;}
if ($view == 'tag') { return; }
This should help, let me know if it works for you.

Thank you, Jan
If you find Phoca extensions useful, please support the project
tastymouse
Phoca Member
Phoca Member
Posts: 12
Joined: 28 Mar 2013, 14:31

Re: Tags does not work anymore after installing Phoca open graph

Post by tastymouse »

In which file do we have to change the code?

Edit: the answer is plugins/content/phocaopengraph/phocopengraph.php
jsolis
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 26 Jul 2016, 20:42

Re: Tags does not work anymore after installing Phoca open graph

Post by jsolis »

I'm not sure if I'm having the same issue. The site is: esfacilserverde.com/portal25/crecimiento-de-consciencia/255-viviendo-de-la-manera-dificil

When I share on FB, it appears this:

http://www.digilibro.com/soporte/phoca1.jpg

I have installed and activated 3 phoca plugins

http://www.digilibro.com/soporte/phoca2.jpg

The metatags generated are this (from "view source code"). I don't know where the last tags are being generated, because I can see the correct ones (og:) are before those, and why the FB share is using the description tag insted of the og:description tag. Any idea on solving this?


<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="http://esfacilserverde.com/portal25/cre ... ra-dificil" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="custom keys for seo" />
<meta name="rights" content="custom rights for seo" />
<meta name="og:title" content="Viviendo de la manera difícil" />
<meta name="og:type" content="article" />
<meta name="og:image" content="http://www.esfacilserverde.com/portal25 ... ficil1.jpg" />
<meta name="og:url" content="http://esfacilserverde.com/portal25/cre ... ra-dificil" />
<meta name="og:site_name" content="Es fácil ser verde" />
<meta name="og:description" content="Todo este año me he preguntado ¿por qué hacemos la cosas de la manera difícil? Seguramente es mucho más fácil obtener un trabajo de 9 a 6, manejar un carro nuevo, tener una casa bonita, comprar toda nuestra comida en el supermercado y, en resumidas cuentas, tener una &quot;vida normal&quot;" />
<meta name="author" content="Es fácil ser Verde" />
<meta name="description" content="custom description for seo" />
<meta name="generator" content="custom generator for seo" />

<title>Viviendo de la manera difícil</title>
kazemgh
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 19 Jul 2016, 14:38

Re: Tags does not work anymore after installing Phoca open graph

Post by kazemgh »

Jan wrote: change
FROM:

Code: Select all

if ($app->getName() != 'site') { return;}
TO:

Code: Select all

if ($app->getName() != 'site') { return;}
if ($view == 'tag') { return; }
WORKED!! :D
THANK YOU SO MUCH!!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Tags does not work anymore after installing Phoca open graph

Post by Jan »

Ok, set in version 3.0.7

https://www.phoca.cz/download/category/6 ... aph-plugin

Thank you for the info,
Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Tags does not work anymore after installing Phoca open graph

Post by Jan »

jsolis
<meta name="description" content="custom description for seo" />
<meta name="generator" content="custom generator for seo" />
These tags are not set by Phoca Opengraph plugin.
If you find Phoca extensions useful, please support the project
Post Reply