Problem/Motivation

Using the Raw uri, Raw title, or Raw options tokens for a link field instance does not output those contents -- it prints a number instead.

Steps to reproduce:

  1. Add a link field to a content type and create one or more nodes of that type with links.
  2. Create a view to display this content type using fields.
  3. Configure the field and choose the "rewrite results" option.
  4. In "Override the output of this field with custom text" use any of the "Raw" tokens (uri, title, options).

rewrite settings in link field configuration of view

Expected result: Token will output the raw value: URI, link title, or link options.

Actual result: Token outputs a number (0 in one case; 1 in another -- it doesn't appear to be the node/entity ID but I'm not sure what it is). It also exists whether or not you check the "URL only" or "Show URL as plain text" options.

view output with link tokens

There are probably other ways to expose the contents of the token without creating a view, but this was the context in which it came up for me.

Proposed resolution

Remaining tasks

User interface changes

None.

API changes

Data model changes

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because these tokens don't output what their names reflect.
Issue priority Major because although it's a small bug, the tokens are a pretty basic part of site building.
Prioritized changes The main goal of this issue is a bug fix.

Comments

rootwork created an issue. See original summary.

dawehner’s picture

rootwork’s picture

Component: token system » views.module
Status: Active » Closed (duplicate)

Yep, you're right. And that explains the "0" vs. "1" output too.

rootwork’s picture