Replace url from multiselect


I am using Kirby 4 and PHP 8.2. I have created a ‘multiselect’ field in all my articles, and depending on the selection, they contain one or more URLs pointing to “programme/…”. We now want to change the name of the page “Programme” to “Programmes” with an “s”, but all the links are broken. How can I modify the .txt files of all articles (in multiple languages)?

A .txt example :

Category: programme/democracia-yona-friedman, programme/l-exposition-mobile-yona-friedman, programme/la-nuit-electrique-theodora-barat-peter-downsbrough-anne-fremy-yona-friedman-lola-gonzales-yan-tomaszewski-nicholas-vargelis, programme/le-musee-sans-batiment-yona-friedman

If you want to do this in your IDE, you could do a full text search for programme/ and replace it.

Or write a script that goes through all languages and translations and replaces it.

To prevent such issues in the future, consider using page UUIDs as values for the multiselect (or use a pages field instead).

1 Like