Page 3 of 5

Phoca open graph litlle description problem

Posted: 19 Oct 2019, 16:27
by exigo
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

Re: phoca open graph

Posted: 22 Oct 2019, 00:37
by Jan
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

Re: phoca open graph

Posted: 10 Jan 2020, 05:31
by mgallard
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.

Re: phoca open graph

Posted: 10 Jan 2020, 22:42
by Jan
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

Re: phoca open graph

Posted: 18 Mar 2020, 19:51
by Kostelano
Good afternoon!
I started using the plugin and I have a question - how to understand this parameter:

Code: Select all

Remove Strings (Description)
Remove strings from description in case Intro Text is set as description. Separate each value with comma (,).
I don’t understand how to use it and what to enter. :(

Thanks!

Re: phoca open graph

Posted: 21 Mar 2020, 20:49
by Kostelano
Good evening!
Phoca Open Graph System Plugin in conjunction with OSMap causes a sitemap error for XML pages:

Code: Select all

Call to undefined method Joomla\CMS\Document\XmlDocument::addCustomTag()
This problem is solved by excluding com_osmap in the plugin settings, but for obvious reasons, the OPEN GRAPH markup for the HTML page is also lost.

Perhaps in the future you will find a separate solution for the problem with XML.
Thanks!

Re: phoca open graph

Posted: 22 Mar 2020, 21:48
by Jan

Re: phoca open graph

Posted: 22 Mar 2020, 22:19
by Kostelano
Hello! Thanks.

I read the information on the page that you gave.
The fact is that I use the system plugin (Phoca), I don’t have a content plugin at all.
And by the way, the OSmap Free version is also the latest :).
The issue is resolved for the Phoca content plugin, but is NOT resolved for the system one.

Update.
Is it possible to implement a check in which metadata will be used for a page in HTML and, accordingly, the plugin will be turned off for pages in XML?

Re: phoca open graph

Posted: 22 Mar 2020, 22:46
by Jan
Hi, try to open this file:

plugins\system\phocaopengraph\phocaopengraph.php

and on line cca. 75 change FROM:

Code: Select all

if ($docType == 'pdf' || $docType == 'raw' || $docType == 'json') {
			return;
		}
TO:

Code: Select all

if ($docType == 'pdf' || $docType == 'raw' || $docType == 'json' || $docType == 'xml') {
			return;
		}
and let me know if it works.

Re: phoca open graph

Posted: 23 Mar 2020, 11:42
by Kostelano
Jan
Thanks a lot, it works!