Topic-icon Open Graph Object for categories not working

Active Subscriptions:

None
Hello,
I am trying to setup some objects for my categories and I have some issues.

Let's take this category infinitemandala.com/meditazioni-guidate for which I have setup this object
File Attachment:


1 - there is no parameter in the object to set the og:title tag. I would have assumed that the category title would have been picked automatically but instead
the og:title tag points to the default og:title I set in open graphs > configuration > defaults

2 - a similar issue happens for the og:description tag, it is not being generated using the category description but the default description I set in open graphs > configuration > defaults

using your {SCOpenGraph url=http://www.sourcecoast.com} tags always works, but I'd rather use the object feature as it is easier to enable/disable each object

Thank you
The topic has been locked.
Support Specialist
10 years 3 months ago #57104 by alzander

1 - there is no parameter in the object to set the og:title tag. I would have assumed that the category title would have been picked automatically but instead
the og:title tag points to the default og:title I set in open graphs > configuration > defaults

I just looked at our code. This is strange. I never realized we didn't implement that. If you edit the /plugins/opengraph/content/content.php file, around line 180, you'll see:
$this->addOpenGraphTag('description', $desc, false);
Add the following after that, which should set the title to the category title:
$this->addOpenGraphTag('title', $category->title, false);

2 - a similar issue happens for the og:description tag, it is not being generated using the category description but the default description I set in open graphs > configuration > defaults

This sounds like a bug that we haven't heard of before. There is definitely an option to do that and I see the code that should be, so unsure why the default would be used instead.

Alex
The topic has been locked.