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.

  • 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 9:59
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.

|improve this answer|||||
  • 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 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 Dec 20 '17 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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