Issues running search-replace on URLs in table
-
Hi, thanks for your hard work maintaining this plugin!
I’ve noticed that URLs in tables are stored with escaped slashes in the database. This is causing an issue when trying to run a search and replace for a full URL (or in my case, clone a site using NS Cloner).
I think, normally, this wouldn’t be noticed because the primary domain can still be replaced easily (e.g. https://www.example.com has no slashes). However, I came across this issue because I’m running a multisite install, where the site ID of all ‘uploads’ resources is stored in the URL (e.g. https://example.com/wp-content/uploads/sites/123/2018/02/image.png, where 123 is the site ID). When I migrate a site that has tables that contain images, the search-replace doesn’t identify the full image URL and fails because the URL in the database is stored with escaped slashes (e.g. http:\/\/example.com\/wp-content\/uploads\/sites\/123\/2018\/02\/image.png)
I raised this issue initially with the NS Cloner developer and he advised to bring it up with you, suggesting escaped data shouldn’t be typically stored in the DB, unless for a specific reason. You can read that response here: https://www.ads-software.com/support/topic/tablepress-support-2/
Any advice on working around this problem, or implementing a fix would be appreciated!
Thanks!
Will
- The topic ‘Issues running search-replace on URLs in table’ is closed to new replies.