Keyword

K2 is generating the wrong OG Tag

More
9 years 8 months ago #135874 by dave
K2 is generating the wrong OG Tag was created by dave
Hi,

I have been told that my K2 is generating the wrong og title tag. As a result, facebook is messing up my posts. The attached imgur link shows what it does for page www.happyhourprices.com/drink-specials/brisbane/central-brisbane/new-farm-teneriffe-newstead/bitter.html

I looked through the head code and I found the offending line. How do I change this?

<meta property="og:title" content="Central Brisbane">

imgur.com/CWR4lPX

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #135890 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 is generating the wrong OG Tag
There are duplicate Og Tags in your site, one from K2 and one sh404sef which are both the same.

If you are using the site's title in your <title> element then the Happy Hours will be appended to all your OG title tags.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #135898 by dave
Replied by dave on topic K2 is generating the wrong OG Tag
Sorry I didn't explain myself properly. The sh404sef one has this tag <meta property="og:title" content="Bitter Suite - Happy Hour Prices"> This is the correct one. And the K2 one has this tag <meta property="og:title" content="Central Brisbane"> I'm not even sure where that's coming from - it's only on the page in the breadcrumbs. It's actually a category.

Unfortunately it's always grabbed by Facebook on my posts. How can I stop K2 from generating these tags or get it to generate the right ones?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #135922 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 is generating the wrong OG Tag
Both titles now show
<meta property="og:title" content="Bitter Suite - Happy Hour Prices"/>

It could be a caching issue. Make sure K2's system plugin is executing before the cache plugin.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Thorbjorn Waagstein
  • Thorbjorn Waagstein's Avatar
  • Offline
  • New Member
More
8 years 11 months ago #148591 by Thorbjorn Waagstein
Replied by Thorbjorn Waagstein on topic K2 is generating the wrong OG Tag
I have the same problem on my website: www.waagstein.com. When I paste a link to an item on Facebook (e.g. waagstein.com/index.php?option=com_k2&view=item&id=106:grand-canal&Itemid=278&lang=en), the right text and image pop up, but a wrong title from another item is displayed. I tried the changes to the view.html.php (under the folder components/com_k2/views/item) as suggested here: www.itoctopus.com/k2-and-setting-the-wrong-open-graph-description-meta-tag, but that didn't change anything. Any suggestrions? (I am using the template NuBlog)

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 11 months ago #148595 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 is generating the wrong OG Tag
Hello,

There are a couple of issues with your site.
First please update to K2 and Joomla!'s latest version. This is a security precaution.

Furthermore K2 is generating the correct metatags. There are however three more sets of og: tags generated by a 3rd party extension.

It is really possible that these tags are being generated from the social sharing extension you are using.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Thorbjorn Waagstein
  • Thorbjorn Waagstein's Avatar
  • Offline
  • New Member
More
8 years 11 months ago #148614 by Thorbjorn Waagstein
Replied by Thorbjorn Waagstein on topic K2 is generating the wrong OG Tag
Thanks for the answer. I tried to deactivate all the social plugins I could find (including "follow-me"), but the problem persists. Next I updatex to Joomla 3.2.7, but there was no suggestion in Joomla Update update K2. There is a suggestion to update to Joomla 4.4, but I will have to make sure first that my provider has the right PHP version for that.
By the way, after the Joomla update, my page doesn't load (Not found message). I am waiting for my server administrator to look at that. But basically, the problem is not solved.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 11 months ago #148643 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 is generating the wrong OG Tag
You will need to update 3.4.5 later on today since there is a critical security issue.

For the 404 issue:
Make sure that you have properly setup your rewrite rules and SEF URLs.
docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs

Finally I rechecked nuBlog and the conclusion remains the same.
K2 only prints one set of og:tags (the correct set). The other sets are printed by a 3rd party extension.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Thorbjorn Waagstein
  • Thorbjorn Waagstein's Avatar
  • Offline
  • New Member
More
8 years 11 months ago #148654 by Thorbjorn Waagstein
Replied by Thorbjorn Waagstein on topic K2 is generating the wrong OG Tag
Thanks for the advice. My 404 error was actually the result of checking "URL rewrite" in Global Configuration. My website administrator has promised to move the site to an updated PHP. When he has done that I will follow your advice to update to Joomla 3.4.5.
With the update to Joomla 3.2.7 the problem with wrong OG tag has been solved, so the title is now OK. However, I also get the "category", which I am not interested in. And I lost the image when I past into Facebook, e.g.:
waagstein.com/index.php/en/contents-eng/categories/economics-politics/106-grand-canal

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 11 months ago #148660 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 is generating the wrong OG Tag
The OG: image should be at least 200px in all dimensions.
waagstein.com/media/k2/items/cache/d6e7bc44feb1613d041d5385e5745b10_S.jpg is too small. You can change the size to M or L in K2's settings.

The /categories/ part is coming from your menu structure. This is Joomla!'s default behaviour.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum