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

Removing retour field doesnt remove redirects #75

Open
ghost opened this issue Jun 12, 2017 · 2 comments
Open

Removing retour field doesnt remove redirects #75

ghost opened this issue Jun 12, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 12, 2017

I recently tried to remove a Retour redirect field i had on a section full of entries. Once i removed the field in the field layout editor for the section, i re-saved the section to update all existing entries.

However this didn't remove the dynamic redirects from Retour - looking in the retour section in the CP sidebar showed the dynamic redirects still in place (and the redirects were still in place on the front-end). I double checked to confirm that the field was no longer showing when editing an entry in that section.

The one thing i didnt try was deleting that field altogether to see if that worked in removing those dynamic redirects. In the end i completely uninstalled the plugin and reinstalled it, re-adding static rules that i wanted to keep (which was only a couple).

@SimonEast
Copy link

I'm not the plugin author, but I think this may be partly due to how Craft works. When you disable/remove a field from a section, it does not actually remove the data (you can actually use this to your advantage to create "hidden fields"). So there would need to be a way to remove the data from the entry. I'm not exactly sure of the best approach to that.

@khalwat
Copy link
Contributor

khalwat commented Aug 30, 2017

The problem is that Retour doesn't really know when a field is removed from a layout. It could listen for an event to see when this happens, but it removing redirects when a field is removed could be a little dangerous.

Probably there should be a way to delete these redirects, though. I'll make this a feature request.

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

2 participants