phoca open graph

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
exigo
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 20 Sep 2017, 11:30

Phoca open graph litlle description problem

Post by exigo » 19 Oct 2019, 16:27

Hello Jan!

I too have a problem with open graph plugin.
So, I read all doc, I think I understand it that.
Configure the plugin, I checked Fb debugger sharing works fine.
Only one thing not working the description option.
I use menu point metadata option, I use it metakey, and description too.
I look at the source, and the default meta name description row is ok, but the meta property="og:description" use it the global description and not the menu point metadata.
I tried all option in the plugin setup, not change.
So I install the system plugin and now working fine, but now have 2 row meta property="og:description".
The first is a bad row, when use it the global meta, 2. use it my option from menupoint metadata.

I hope understand my problem...

What I will do it now? :)
Thanks!

Joomla! 3.9.12
PHP 7.3.10
10.1.41-MariaDB-cll-lve

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

Re: phoca open graph

Post by Jan » 22 Oct 2019, 00:37

Hi,

both plugins are different regarding the description:

- System plugin just uses document description
- Content plugin uses this flow: https://www.phoca.cz/documents/70-phoca ... open-graph

So the content is following:

Code: Select all

// Description

		if ($this->params->get('description'.$suffix, '') != '') { // description in params
			$this->renderTag('og:description', $this->params->get('description'.$suffix, ''), $type);
		} else if (isset($thisDesc) && $thisDesc != '') { // article meta description
			$this->renderTag('og:description', $thisDesc, $type);
		} else if ($this->params->get('menu-meta_description') != '') { // menu link meta description
			$this->renderTag('og:description', $this->params->get('menu-meta_description'), $type);
If there is no description in parameters and in article meta description, the menu link description should be displayed. :idea: Are you sure both 1) and 2) are empty?

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

mgallard
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 10 Jan 2020, 05:26

Re: phoca open graph

Post by mgallard » 10 Jan 2020, 05:31

A specific issue:

I am using smartslider on many of my site's pages, so the description sometimes appears thus:

<meta property="og:description" content="smartslider3[29] Puerto Vallarta está ubicado en la Costa Dorada de México, en el punto medio de norte a sur en la Bahía Banderas, donde el Océano Pac...">

Is there a way to configure the descriptions so Phoca removes all "smartslider3[*]" found in them?

Thanks a lot,

M.G.

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

Re: phoca open graph

Post by Jan » 10 Jan 2020, 22:42

Hi, the only way I can imagine now, is to make the modify of the plugin directly in the code and set there some preg_replace function which will remove this or similar text from the description :idea:

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

Post Reply