This project is not covered by Drupal’s security advisory policy.

Makes sure that the [node:summary] token (as used in metatag module as the default description actually works in D7.

Update: May 2014, a fix is in core 7.28, so this module is totally unnecessary now

Update: April 2013, a fix is in metatag beta6, so this module is mostly unnecessary now

If you've been using it, I recommend upgrading metatag and removing this altogether.
#1295524: [node:summary] does not work in default content meta tag when summary left empty

This is an interim fix for a core+metatag issue, and is intended to have a short lifetime. It's provided as a stand-alone module so that it can be applied to critical live sites without core hacks or -dev branches.
ONLY use this module if you are using metatag and want the "description" to use your nodes body teaser text (which is the expected default) and you've found that it's not working.

This is a work-around mini-module that addresses the long-standing problem identified in Sept 2011 as "[node:summary] does not work in default content meta tag when summary left empty" and eventually branched as a core patch in "The [node:summary] token does not output anything for body fields without a manual summary" - which got bumped to Drupal 8 (no backport yet) and at October 10, 2012, is still not in.

The code here is based on a stand-alone module example from Marty2081 on April 18, 2012 (and the code that is pending inclusion in D8) but I reworked it to use hook_tokens_alter so that it could override the core [node:summary] token transparently instead of using a new made-up replacement token.


This task can also be done with a core hack that anticipates the eventual core patch that should have gone in a while ago.
For convenience, a D7 copy of this hack/patch is also included in this module distribution. Use one or the other, not both fixes. The patch file here is a straight backport of the patch pending (slowly) in the core D8 queue

Project information