Hi Lucia,
The reason you are having this error is that your controller's method contains GetProperties()
call which tries to get the widget properties from the request. If you make a direct call to a widget controller omitting the page the request will not conain data to get the widget properties. Basically, when you perform an Ajax call to /culture/{controller}/{action} URL the system has no idea how it should get the widget parameters.
Here is what you could do:
- in the widget view you can include widget parameters required for Ajax call into some data attributes
- in the widget controller you can create additional GET method that will accept these parameters and return the required response
- in the Ajax call you are making include the parameters rendered in the first step
I hope it makes sense.