Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Direct pagination feature throws error if you try to change page to a non number View modes: 
User avatar
Member
Member
joeh42 - 5/20/2011 8:39:36 AM
   
Direct pagination feature throws error if you try to change page to a non number
The file CMSWebParts\Membership\Users\UsersViewer.ascx.cs throws an error if you try to change pages to, say "abc".

Line 840: repUsers.DataBind();

Should Kentico throw an error in this case? I would imagine that you really don't need to throw an error - that it would make more sense to just send user to page 1.

Should this be changed in future versions? I suppose someone could override the pagination to use the alphabet, i.e. page=a, but I don't see why.

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 5/25/2011 4:30:28 PM
   
RE:Direct pagination feature throws error if you try to change page to a non number
Hello,

What version of Kentico CMS are you running? I wasn't able to reproduce that behavior on my 5.5.22R2 site. I'm always correctly redirected to the first page when I append incorrect value for the pager query string (different from a integer number, or some higher number).

If you have the same version, would it be possible to see that behavior on your live site (if any)?

Best regards
Ondrej Vasil

User avatar
Member
Member
joeh42 - 5/26/2011 4:11:09 PM
   
RE:Direct pagination feature throws error if you try to change page to a non number
I'm using v5.5.4125 R2. I implemented a fix on our public website so its not apparent on the live site right now...

Did you try entering a text value into the direct pagination textbox by any chance?

Let me know what you think.

Thanks,
Joe Hoppe

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 6/1/2011 2:21:48 AM
   
RE:Direct pagination feature throws error if you try to change page to a non number
Hello,

Firstly, I tried it with the query string paging mode. I gave it another shot and used the direct pager textbox in cooperation with the postback mode and it works just fine as well - with the only difference the pager goes to the actual page rather than to the first one.

Are there any customizations on your site which might affect this behavior?

Best regards
Ondrej Vasil