Keyword

Meta description tag contain script text

  • JaccoK
  • JaccoK's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago - 8 years 6 months ago #147698 by JaccoK
Items with no specified meta description, contain script text in the generated meta tag description.

Directly after the image, the html meta description contain some adsense script that's supplied by a K2-Tools module.

Result in the HTML Source (and also in google search results).

<meta name="description" content="ADSENSE-Breadcrumb-top-k2 (adsbygoogle = window.adsbygoogle || []).push({}); Voor mobiel bellen wordt gebruik gemaakt van een sim kaart. Deze kaart wo..." />

How can I fix this, without an explicit definition of the item description.

I have K2 2.6.9 and Joomla 3.4.4

JaLink : jalink.vuren.info
Last edit: 8 years 6 months ago by JaccoK. Reason: Version info

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #147708 by Krikor Boghossian
Replied by Krikor Boghossian on topic Meta description tag contain script text
Are you using any SEO/ SEF extensions?

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

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

  • JaccoK
  • JaccoK's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago - 8 years 6 months ago #147713 by JaccoK
Replied by JaccoK on topic Meta description tag contain script text
I don't use external seo/sef components.
Only activated standard Joomla SEO settings and advanced SEF for K2 URLs.

JaLink : jalink.vuren.info
Last edit: 8 years 6 months ago by JaccoK.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #147741 by Krikor Boghossian
Replied by Krikor Boghossian on topic Meta description tag contain script text
This issue was caused in some sites by a K2 Ad extension.
Are you only using K2 Tools for your ads?

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

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

  • JaccoK
  • JaccoK's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago #147756 by JaccoK
Replied by JaccoK on topic Meta description tag contain script text
I don't use ads extensions.
Only pasted adsense code into the K2 - Tools module (Functionality : Custom Code).

JaLink : jalink.vuren.info

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #147775 by Krikor Boghossian
Replied by Krikor Boghossian on topic Meta description tag contain script text
Can you send me a link to your site?
You can hardcode a meta description based on your introtext's value.

[code]<?php
$doc = JFactory::getDocument();
$doc->addCustomTag('<meta name="description" content="'.$this->item->introtext.'" />');
?>/code]

But lets see if we can around that.

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

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

  • JaccoK
  • JaccoK's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago #148083 by JaccoK
Replied by JaccoK on topic Meta description tag contain script text
Hi Krikor,

The link to my site, page with the wrong description tags, jalink.vuren.info/sport/voetbal/37-legendarische-voetbaluitspraken/

MetaTags:
<meta property="og:description" content="(adsbygoogle = window.adsbygoogle || []).push({}); Tijdens de live voetbalverslagen doen de verslaggevers soms uitspraken die lachwekkend of..." />
<meta name="description" content="(adsbygoogle = window.adsbygoogle || []).push({}); Tijdens de live voetbalverslagen doen de verslaggevers soms uitspraken die lachwekkend of..." />

JaLink : jalink.vuren.info

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #148132 by Krikor Boghossian
Replied by Krikor Boghossian on topic Meta description tag contain script text
How is that banner generated? Through a {loadposition} snippet or through a template override?

If you are using an override you can try moving the code outside the introtext's div.

In every other case you need to enter the snippet I gave you in the item.php file.

More on overrides can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

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