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.

Glorfindel
  • 203
  • 1
  • 3
  • 10
hashtagerrors
  • 426
  • 3
  • 16
  • I guess this might be because <img src="/path/file-to-be-replaced.png"> must be storing in some other format in the database. – hashtagerrors Dec 19 '17 at 09:59

1 Answers1

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.

Brad Bell
  • 67,440
  • 6
  • 73
  • 143
  • 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 ? – hashtagerrors Dec 20 '17 at 04:53
  • Sure... could be done with a one-off PHP script or simple Craft plugin doing exactly what you need it to. – Brad Bell Dec 20 '17 at 05:32