3

I have <img src="/path/file-to-be-replaced.png"> in a Single-Line Text Type in a Table Field Type which is inside a matrix. Now I want to replace all of them through Find and replace option. But when I use <img src="/path/file-to-be-replaced.png"> and Yes in Find and Replace Fields respectively then nowhere it is replaced. However a task runs saying Replacing “<img src="/path/file-to-be-replaced.png" />” with “Yes” but still nothing happens.

Could anyone please help.

1
  • I guess this might be because <img src="/path/file-to-be-replaced.png"> must be storing in some other format in the database. Commented Dec 19, 2017 at 9:59

1 Answer 1

2

The Find and Replace tool only works with "textual" field types (i.e. Plain Text and Rich Text fields). Table fields store their content JSON encoded in the database so the tool ignores it.

2
  • Thank You for the information. Just a quick question, Is there an easy way of doing above task rather then manually changing it one by one ? Commented Dec 20, 2017 at 4:53
  • Sure... could be done with a one-off PHP script or simple Craft plugin doing exactly what you need it to.
    – Brad Bell
    Commented Dec 20, 2017 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.