Problem

Goto the "Meta tags » Defaults » Views" admin page:
/admin/config/search/metatags/config/views
These errors appear after clicking "Save":

  • The Description is using the following invalid tokens: [view:description].
  • The Title is using the following invalid tokens: [view:title].
  • The Canonical URL is using the following invalid tokens: [view:url].

Proposed resolution

Temporary fix - to patch metatag.module, attached.

Remaining tasks

Need review, need better solution, e.g. move "token types" option to the configuration in the hook_metatag_config_instance_info().

Files: 
CommentFileSizeAuthor
#2 allow_view_tokens.patch656 bytesDasha_V
allow_view_tokens.patch1.77 KBDasha_V

Comments

Status:Needs review» Needs work

StatusFileSize
new656 bytes

New patch with fixes after additional testing other metatags pages

I think actually #1894880: token_get_entity_mapping() should fallback to the entity type if token type not found is a better solution to fix this in Token module.

Also we should rename the context from 'views' to 'view'. The context should match the same syntax as the other entity types, which are not plural.

Status:Needs work» Fixed

Renamed context from 'views' to 'view'.

Title:Invalid tokensToken validaiton fails on config edit if the instance context isn't an entity type
Project:Views metatags» Metatag
Version:» 7.x-1.x-dev
Status:Fixed» Active

Moving to the meta tags issue queue to fix metatag.admin.inc.

Status:Active» Fixed

Fixed in 7.x-1.x with http://drupalcode.org/project/metatag.git/commit/a19db4b and will be included in the next Meta tag release.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.