Install

Works with Drupal: ^9.2 || ^10 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 25.81 KB
MD5: 9180c1691e408ed8c0fb31cd74cccf66
SHA-1: e010c4bfa75cb8fe2a108159b90e6c08c2251e00
SHA-256: 34a5d18b3b5ce310db3039f6a6823fe6869e019be30f8cccc75b78350ad56f77
Download zip 45.67 KB
MD5: d4509a77c158f162680d37dc5a6f8a2f
SHA-1: cc8d35b2c2d07b8cddccd944afea9c601027c180
SHA-256: 1798897f739b9f258836504dd87d200a74fa6c3247147182f42dccc2a020697b

Release notes

A bug-fix release for the 2.x branch. Quoted fallback strings can now contain pipes, Microsoft Office conditional comments are no longer stripped, and token validation now checks every OR token in a string. This is expected to be the last 2.x feature release; Drupal 12 support will come in 3.x, which drops Drupal 9.

Behavior changes

  • Bracketed text containing a | is only treated as an OR token when at least one part is a real token (type:name) or a quoted string. Other text such as [if mso | IE] is now left untouched, even with the clear option (which the Webform submodule always sets).
  • Token validation (e.g. Pathauto patterns, Metatag fields) now checks every OR token in a value, not just the first. A value with an invalid token in a later OR group will show a validation error the next time it is saved.

Tested with

Drupal 9.5, 10.6 and 11.4 on PHP 8.1 through 8.5. Drupal 9 could only be installed for testing with Composer's security advisory blocking disabled; Drupal 9 support ends with 3.x.

Contributors (10)

ok4p1, pianomansam, keshav patel, jeroent, it-cru, milanbombschliip, mukeshaddweb, allandk, fromme, bryanmanalo

Changelog

Issues: 6 issues resolved.

Changes since 2.3.2:

Bug

  • #3491615 Support for pipes inside of strings
  • #3591289 Ignore mso comments
  • #3337496 Deprecated function: preg_match_all(): Passing null to parameter #2
  • Token validation only checked the first OR token in a string

Feature

  • #3301741 Add token_or.api.php documenting hook_tokens_pre_alter()
  • #3412515 Add Token OR example to Drupal internal help page

Development

  • #3591318 Add ddev (ddev-drupal-contrib) for local development and testing
  • CI now opts in to testing the previous core major, adjacent minors and the latest PHP
Created by: pianomansam
Created on: 26 Oct 2026 at 17:46 UTC
Last updated: 26 Oct 2026 at 17:50 UTC
Bug fixes

Other releases