Rewrite plugin does not work after Explode

Created on 2 July 2019, about 6 years ago
Updated 31 July 2025, 5 days ago

Rewrite uses the key/value pairs from the source for string translations. This may not be correct if the source has previously been exploded; the value is still the unexploded value.

I'm creating a patch that uses the passed $data instead of the value, if the key matches the source. I'm not at all sure if this is the correct approach, but it's making sense for the project I work on. Open to other ideas.

🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands megachriz

    A fix for this issue is now available in a combination of two other issues:

    • 🐛 "Rewrite" plugin doesn't work right Active
      This ensures that the data of previously applied Tamper plugins (thus before the Rewrite plugin) is written back to the item. The Rewrite plugin then finds the most up to data on the item.
    • Rewrite plugin: iterate through values to rewrite Needs work
      Among other things, this adds support for arrays for the Rewrite plugin. If your initial source value is for example Foo,Bar,Qux and you explode that using a comma as separator and then use the Rewrite plugin to add a "x" to it, you'll get ["Foox","Barx","Quxx"] instead of ["Foox","Foox","Foox"].

    Closing this as a duplicate now.

Production build 0.71.5 2024