Install

Works with Drupal: ^8.8 || ^9 || ^10 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 62.79 KB
MD5: 35b61838a8db03814c986dec4f884f8e
SHA-1: 4a2111d9a76348ffa3de760eef598f9471b8c2a4
SHA-256: db6323236529456af70a37773209adc6615db09fca8bf941a172247bb458ce03
Download zip 149.88 KB
MD5: 00fd453ceefe49077f2d8e9fb31989c5
SHA-1: 57cdf8e00396ea3716c74e3c6b92615b0ac64c62
SHA-256: a98deb487140274c49a7b5ee4005bcb28480f409dba3a874f8d2194b4af66c1d

Release notes

Major changes for Keyword Filter and Encode; new plugins: Entity Finder and Absolute Url; empty value handling

Compared to previous releases, this release has larger changes:

  • There are changes in behavior for plugins Keyword Filter and Encode.
  • The last two remaining plugins from the D7 version have been ported: Entity Finder and Absolute URL.
  • Most Tamper plugins were changed to handle empty values better.

Major changes to the Keyword Filter and the Encode plugin

For two Tamper plugins there have been major changes in order to fix existing bugs in it. The behavior of these plugins changed a bit, so it is good to check if these plugins still work as intended for you.

Keyword Filter

  • When an item doesn't match the configured requirement, a SkipTamperItemException gets thrown. Previously, an empty string was returned. This is a behavior change, but it makes it consistent with the behavior of the Required plugin + consistent with how the plugin behaved in the D7 version.
  • Configuration keys changed:
    • Settings 'regex' and 'function' are removed, these things are now determined on runtime instead of after submitting the configuration form.
    • The settings 'words' and 'word_list' are replaced by 'words_list'. The setting 'words' is deprecated, but for now kept for backwards compatibility, but 'word_list' is removed.

Encode plugin

  • Not all modes could handle multiple values. A fix is made so that multiple values are iterated over in case that mode only supports a string as input.
  • The 'Json Decode' mode now returns an array where it previously returned an object. Note: this mode can return a string too, depending on the input.
  • A new option for encoding or decoding YAML is added.

New plugins

  • Entity Finder
    Allows you to lookup the ID of an existing content entity by searching for the source value on a specific field. So if the source value is for example "Lorem ipsum" and you choose to search on node title, this plugin will return the ID of a node whose title is "Lorem ipsum".
    Note: there are plans to expand this plugin, allowing it to return the value of a field on the entity, rather than just only the entity ID. See #3509334: Entity Finder: add return field option.
  • Absolute URL
    Replaces relative urls in HTML with absolute urls. Input must be HTML code and an other source must contain the base url.

With these two plugins added, all Tamper plugins from the D7 version are ported! So now we can move on to the beta stage!

Empty value handling

Most Tamper plugins have been changed so they can handle empty data better. Previously, these plugins would throw an exception if they received NULL or an empty string as input. How each plugin responds to an empty value differs per plugin. Most plugins will return the data as is, but a few others would convert it to a value that makes sense for that plugin. For example, the Math plugin will by default treat an empty value as a zero (as it already did before). But you can configure the Math plugin also to return the data as is when the data is empty.

Contributors (15)

megachriz, jamesdixon, zabej, ericgsmith, jhodgdon, liquidcms, vijay.mayilsamy, tbenice, meecect, danharper, davidburns, lammensj, jurgenhaas, kopeboy, ptmkenny

Changelog

Issues: 13 issues resolved.

Changes since 8.x-1.0-alpha5:

Bug

Feature

Task

Created by: megachriz
Created on: 27 Feb 2025 at 11:15 UTC
Last updated: 27 Feb 2025 at 11:15 UTC
Bug fixes
New features

Other releases