Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Craft Search and Replace Tool? #114

Closed
groe opened this issue Sep 12, 2017 · 5 comments
Closed

Support for Craft Search and Replace Tool? #114

groe opened this issue Sep 12, 2017 · 5 comments

Comments

@groe
Copy link

groe commented Sep 12, 2017

Craft provides this handy tool in the admin CP which replaces strings with other strings in all text/richtext fields - even if they are part of a Matrix field. This is especially useful for site migrations (e.g. changing the domain name etc.)

Currently (rich) text fields which are nested in a SuperTable are not searched/replaced though.

Any chance to add support for this? Does Craft provide a way for plugins to hook into this?

@engram-design
Copy link
Member

@groe I've not actually used the Search & Replace tool, but I'll add this to the todo list. Likely to be supported in the Craft 3 version going forward.

@jkorff
Copy link

jkorff commented Sep 1, 2018

I just used the Find & Replace tool and it appears it cannot find strings within links. I wanted to replace "/resources/books/anthologies/" with "/resources/books/".

I also like to suggest to update the tool to report back what it did, or couldn't do, e.g.:

"Updated 15 entries."
"Found no entries matching your search."

Presently it just does its thing and smiles back, but I don't know what happened.

Edit: This is with Craft 3.0.21

@engram-design
Copy link
Member

Currently there doesn't seem to be a way for plugins to access the search and replace functionality. You'll see that Craft itself has a special-case for Matrix fields, but that's all hard-coded in their code #L58. We would need to do the same for Super Table, but would require hooks to modify this functionality.

@jkorff I'm not sure how well this works (again, not used this utility much), but we can't do much about the reporting back of elements - that's all 100% Craft. I'd probably suggest posting this as a feature request on the Craft Github repo.

@jkorff
Copy link

jkorff commented Sep 22, 2018

Ok, thank you for checking this, I'll do that.

@engram-design
Copy link
Member

No movement on this with the Craft issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants