Find/replace problems

Find and replace doesn’t seem to work reliably. I’ve tried many times on a Windows 10 machine and I’m currently using a MacBook Pro - the same problem occurs on both computers.

I usually search first to check what I’m about to replace. This works very well (though it would be great if there were an option to set the current document as the default). I then enter the ‘replace’ text and click Replace All. The process runs quickly and Wappler displays a message - ‘x replacements made in 1 file’. If I then click ‘Find All’ - to search for the replaced text, Wappler indicates ‘no results found’. So everything seems to work smoothly - except no changes are actually made to the file. Perhaps changes are made to a temporary file but not always written to the actual file. Sometimes it works fine; usually it doesn’t.

I just tried again. Everything seemed to work - but no changes were made. I closed and reopened the file - all changes had in fact been made.

If I create several pages which are similar, but have different data sources for example, I often find it quicker to duplicate a page and make a few global find/replaces. Currently I have to do this in a text editor. Not critical, but it would be good to be able to do it within Wappler.

Hi Tom,
Do you mean the changes are not made only in the files open in Wappler? What about other files?

Hi Teodor
I’ve only tried on the current file open in Wappler.
I’ll try with other files later. I won’t be in my office until later today.

I’ve tried again - and this time it worked, on the current file and on closed files. If I spot anything that makes the search behave so erratically, I’ll let you know.

When it works, the search/replace is very fast and it could be an excellent feature. It would be so much easier to use if there were a few more options - eg checkboxes to act on the 1) current page and 2) current folder. It’s convenient to use * wildcards to save typing the name of the current file for example, but it would be quite easy to make a mistake - and find you had inadvertently altered lots of files throughout the site, in different folders.

It’s very useful to be able to find/replace in multiple files - but it’s probably something you rarely need to do. I would certainly never want to find/replace through every file in a site, and you can set rules/exclusions - but only by entering them in a single line (in Options). This feature could be a lot better, UI-wise; as it is, you can’t see most of the exclusions. I also think it would be good to have site-specific exclusions.