sitefinitysitefinity-10

Why sitefinity list allows wrong page url or allows paging?


I am using sitefinity 10.1 MVC. When I used sitifinity list on my page then it allow my page to go to wrong URL. For example, my page link is www.example.com and when I try www.example.com/12, instead of taking me to 404 error page it allows this URL and lands on the actual page. I need to take www.example.com/12 to 404 page.


Solution

  • That's because the "Enable Parameter Validation" setting is checked (by default).

    When it is checked, Sitefinity leaves the widgets on the page to determine whether they can handle this page or should return 404.

    Until a widget says "no, I can't and should not handle this page", a normal page is returned. The List widget is not one that would complain in this case.

    It overrides the HandleUnknownAction where it simply invokes the Index action of the controller and says "I am good with this page, you do what you want with it".

    So what you can try is going to Title and Properties of the page and scroll down, expand the Advanced options and uncheck Enable Parameter Validation. Save and try again.