-
Notifications
You must be signed in to change notification settings - Fork 44
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
Extensions on helper class does not save to DB #205
Comments
Hi @busrasengul The We are pretty much only doing headless sites these days, and we haven't had any issues with the destination URL. Without knowing too much about your setup, adding the frontend domain (but not the backend domain) to the site node should generally ensure that the destination URLs are correct. Would this help in your situation as well? If you still wish to update a redirect when it's saved to the database, this is currently not possible in the package. I've previously created an issue for Adding events/notifications for CRUD operations, which would be the best way to handle this. But at least for now, its not something I've had the time to look into. Speaking of headless, some of our own sites suffer from the inbound URL column showing the backend domain instead of the frontend domain. There are a number of different scenarios to take into account, so I haven't yet found a good way to handle this directly in the package. But for the inbound URL, the |
Thank you @abjerner |
@busrasengul since this is for a headless site, how are you getting the content (and redirects) from Umbraco? The redirects package does contain two events/notifications that you could normally use for handling something like this for MVC sites, but if the user doesn't hit the normal request pipeline, you can't really use those. The notifications:
Unfortunately it seems that I haven't documented those (although I should), but like mentioned, if you're in a headless context, you probably can't use them anyway. |
Which version of Skybrud Redirects are you using? (Please write the exact version, example: 4.0.8)
13.0.4
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
13.3.2
Bug description
Hey @abjerner !
Trying to extend RedirectsBackOfficeHelper as stated in the docs here
I'm overriding the Mapping functionality in order to change the destination URL, as far as I could understand that's the bit where the redirects get saved. Here's my code
GetCurrentSiteDomain method is just getting the destination URL and adding a FE domain in front of it. I needed this extension so I can use redirects headlessly, as my BE URL is different than my FE URL.
But no matter I try and extend from RedirectsBackOfficeHelper, DB does not pick up my changes. I can see I add my custom URL to IRedirectDestination Destination model URL property, and FullUrl is picked up too, see the old and new Destination model in the screenshots, it doesn't save to DB still..
Am I missing anything or is this a bug?
Thanks in advance :)
The text was updated successfully, but these errors were encountered: