Could not cast from dictionary to safe uri.castinvalid could not cast from dictionary to safe uri:castinvalid
Discussion posts and replies are publicly visible
Seems like you have a dictionary which you try to assign to the url field. Does that dictionary contain a field which holds the url? If yes, try to assign this field to the url parameter.
Adding more to it, if the availability of the URL is uncertain, then consider using index() or property() function.