I have a page that represents a city. In a panel.page.create hook, I am doing a geocoding lookup in Google Maps and then renaming the page according to what Google tells me it should be, in order to avoid duplicate city pages with different pronunciations.
Sometimes the page I am ‘moving’ to already exists. Then I want to delete the current page and redirect the user to the user that was already there.
I have gotten as far as being able to delete the current page if there is one with the same slug already there. But I can’t find a way to redirect the panel to it…