Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In the saving event for the media I'm cancelling the save if they're authorised or not, and this works fine. When I get to making a speech bubble, then I hit a problem.
The line of code is:
((BasePage)HttpContext.Current.Handler).speechBubble(BasePage.speechBubbleIcon.error, "title", "error");
The error is:
Unable to cast object of type 'System.Web.Http.WebHost.HttpControllerHandler' to type 'umbraco.BasePages.BasePage'.
I've tried CurrentHandler as well.
Tried this too
ClientTools clientTool = new ClientTools((Page)HttpContext.Current.CurrentHandler);clientTool.ShowSpeechBubble(SpeechBubbleIcon.Success, "Title", "Message");
and get the error Unable to cast object of type 'System.Web.Http.WebHost.HttpControllerHandler' to type 'System.Web.UI.Page'.
It seems the Current HttpContext isn't a Page but something else - any suggestions on how to do this?
I have the same problem. Did you manage to find a solution?
Not really. I did do a bit of a major hack and modified the rest message response for the particular message we were looking at. This was just a bit of luck because this message had some flags in it that I could hook in the back end, not a general solution though.
Same problem here, but in ContentService.Saved event.
I am also facing same problem as John Hildebrant.
Similiar issue here, I'm trying to build in a check to the "trashing" event for content and media and I'd really like to send a speech bubble back and cancel the reload / refresh of the content tree.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted