+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / NewsView: Sorting Issue

NewsView: Sorting Issue

10 posts, 0 answered
  1. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    14 Dec 2009
    Link to this post
    Hi,

    I have a news view module on a page for which there are around 30-40 news items. We have configured the Sort Expression in Edit > Advanced > Filters > SortExpression to look as follows: Publication_Date DESC. Our paging is set to 10 per page.

    But, what we're seeing is a mix of dates on page 1 including the years 2005 to 2009, then when the user flicks to page two there's another mix of dates again, although each page is sorted in descending order. When we configure the SortExpression to sort ASC it works sorting in ascending order, but again there's a mix of dates on each page.

    The expected behavior here would be to see all the 2009 articles on page 1 and all the 2005 articles on say page 3 or 4.

    What's happening?

    Regards,
    Jacques
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Dec 2009
    Link to this post
    Hi J.Hov,

     I am not able to reproduce this issue locally and on our demo website - http://demo.sitefinity.com. Are you able to reproduce the issue on the demo website? I created a simple page there, hope it will not be reset withing the next  few hours http://demo.sitefinity.com/testNews.aspx


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    15 Dec 2009
    Link to this post
    Hi Ivan,

    I tried looking at the link, but it had obviously reset before I could see it. 

    If you browse to this link you should see what I'm talking about. The paging buttons are at the bottom of the screen, but pay specific attention to the dates (years). 

    http://demo.thedominion.ca/MediaCentre/MediaSummaries.aspx

    Regards
    Jacques
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Dec 2009
    Link to this post
    Hello J.Hov,

    I saw the problem at you website. I suggest that you should upgrade to the last official release - Sitefintiy 3.7 SP2. This should fix the problem.


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    15 Dec 2009
    Link to this post
    Hi Ivan,

    I don't think 'upgrade' is the answer here. Is this a bug or not? 

    We don't have the option to upgrade at this stage since the customer has to have SF 3.7 in a test environment before they choose to upgrade, which at this stage won't happen for a few months. 

    Again, is this a bug? I really don't think it's appropriate when you don't know what the reason for a problem is to just say 'upgrade'. 

    Is there anything else you can offer? 

    Jacques
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Dec 2009
    Link to this post
    Hello J.Hov,

    First the problem cannot be reproduced on the demo website and on a website that uses the last official release of Sitefinity  and on the website that uses the same version as yours.  Actually, the upgrade is a good suggestion, because lots of bugs are fixed and you will be able to sort other problems that could appear. I would like to request the whole project and its databse backup, since we cannot reproduce this problem. I think that this is the best way for us  to see what is going wrong. You can open a support ticket and attach the files. To this post I attached a sample blank project that uses the same version as the website you use. If you setup the website you will find about 30 news items, one page that has NewsView control with paging  and the SortExpression set to Publication_Date DESC, paging is set to 10. The problem cannot be reproduced locally with this project. You can use username/password  admin/admin to access the backend.

    If you have set some properties their combination could also be a reason for the problem. You can try to drop a new NewsView control and see whether the result will be the same for you.

    Just to let you know you receive replies from Sitefinity developer. Additionally you use 3.6  SP1 Hotfix version not 3.7.


     All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    18 Dec 2009
    Link to this post
    Hi Ivan,

    Yes the customer is using 3.6, I didn't say they're using 3.7 I said that they would need 3.7 in a test environment first before they could start thinking of upgrading their production environment to 3.7 FROM 3.6.

    I've also found another part of the puzzle that might be causing our problem. We're using a customized control template. Would the following template cause the problem: 

    1 <%@ Control Language="C#" %> 
    2 <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sfWeb" %> 
    3 <asp:HyperLink ID="backLink" runat="server" Text="<%$Resources:GoBack %>"></asp:HyperLink> 
    4 <asp:Repeater ID="repeater" runat="server"
    5     <ItemTemplate> 
    6         <div style="min-height: 85px; font-family: Arial; font-size: 0.8em"
    7             <asp:HyperLink ID="fullContent1" runat="server" Style="font-size: 1.3em; font-weight: bold; 
    8                 color: black"> 
    9                 <asp:Literal ID="Title" runat="server"></asp:Literal> 
    10             </asp:HyperLink> 
    11             <%--            <div style="margin-top:5px;background: transparent url(/Images/newsTickerThumb.gif) no-repeat; height: 58px; 
    12                 width: 47px; display: inline-block; border: 1px solid darkgray; float: left"> 
    13                 <asp:PlaceHolder ID="ThumbnailHolder" runat="server"
    14                     <asp:Image ID="Thumbnail" runat="server" Height="58" Width="47" /> 
    15                 </asp:PlaceHolder> 
    16             </div> 
    17             <div style="margin-left: 65px;margin-top:5px;font-size:1.2em">--%> 
    18             <div> 
    19                 <strong> 
    20                     <asp:Literal ID="Publication_Date" runat="server" Text="{0}" /></strong> - 
    21                 <asp:Literal ID="Summary" runat="server" Text=""></asp:Literal> 
    22             </div> 
    23         </div> 
    24         <hr /> 
    25     </ItemTemplate> 
    26 </asp:Repeater> 
    27 <asp:Repeater ID="repeater1" runat="server"
    28     <HeaderTemplate> 
    29         <table width="551" cellpadding="0" border="0" cellspacing="0" class="newsArchiveTable"
    30             <tr bgcolor="#6699cc" class="newsArchiveHeaders"
    31                 <th width="70"
    32                     Date 
    33                 </th> 
    34                 <th width="249"
    35                     Title 
    36                 </th> 
    37                 <th width="99"
    38                     Type 
    39                 </th> 
    40                 <th width="133" align="center"
    41                     Attachment 
    42                 </th> 
    43             </tr> 
    44     </HeaderTemplate> 
    45     <AlternatingItemTemplate> 
    46         <itemtemplate> 
    47             <tr class="alternateRow"
    48                 <td class="newsArchiveDate"
    49                     <asp:Literal ID="Publication_Date" runat="server" Text="{0}" /> 
    50                 </td> 
    51                 <td class="newsArchiveLink"
    52                     <asp:HyperLink ID="fullContent1" runat="server"
    53                         <asp:Literal ID="Title" runat="server"></asp:Literal> 
    54                     </asp:HyperLink> 
    55                 </td> 
    56                 <td class="newsArchiveDate"
    57                     <asp:Label ID="Category" runat="server" /> 
    58                 </td> 
    59                 <td class="newsArchiveLink" align="center"
    60                     <asp:Literal ID="Summary" runat="server" Text=""></asp:Literal> 
    61                     <asp:HyperLink ID="fullContent2" runat="server"
    62                         <asp:Literal ID="LiteralFS" runat="server" Text="<%$Resources:FullStory %>"></asp:Literal> 
    63                     </asp:HyperLink> 
    64                     <asp:PlaceHolder ID="ThumbnailHolder" runat="server"
    65                         <asp:Image ID="Thumbnail" runat="server" ImageUrl="~/Images/newsTickerThumb.gif" /> 
    66                     </asp:PlaceHolder> 
    67                     <asp:Literal ID="Author" runat="server"></asp:Literal> 
    68                     <asp:Literal ID="Source" runat="server"></asp:Literal> 
    69                     <asp:Repeater ID="Tags" runat="server"
    70                         <itemtemplate> 
    71                             <asp:HyperLink ID="tagLink" runat="server" /> 
    72                         </itemtemplate> 
    73                     </asp:Repeater> 
    74                 </td> 
    75             </tr> 
    76         </itemtemplate> 
    77     </AlternatingItemTemplate> 
    78     <ItemTemplate> 
    79         <tr> 
    80             <td class="newsArchiveDate"
    81                 <asp:Literal ID="Publication_Date" runat="server" Text="{0}" /> 
    82             </td> 
    83             <td class="newsArchiveLink"
    84                 <asp:HyperLink ID="fullContent1" runat="server"
    85                     <asp:Literal ID="Title" runat="server"></asp:Literal> 
    86                 </asp:HyperLink> 
    87             </td> 
    88             <td class="newsArchiveDate"
    89                 <asp:Label ID="Category" runat="server" /> 
    90             </td> 
    91             <td class="newsArchiveLink" align="center"
    92                 <asp:Literal ID="Summary2" runat="server" Text=""></asp:Literal> 
    93                 <asp:HyperLink ID="fullContent2" runat="server"
    94                     <asp:Literal ID="LiteralFS" runat="server" Text="<%$Resources:FullStory %>"></asp:Literal> 
    95                 </asp:HyperLink> 
    96                 <asp:PlaceHolder ID="ThumbnailHolder" runat="server"
    97                     <asp:Image ID="Thumbnail" runat="server" /> 
    98                 </asp:PlaceHolder> 
    99                 <asp:Literal ID="Author" runat="server"></asp:Literal> 
    100                 <asp:Literal ID="Source" runat="server"></asp:Literal> 
    101                 <asp:Repeater ID="Tags" runat="server"
    102                     <ItemTemplate> 
    103                         <asp:HyperLink ID="tagLink" runat="server" /> 
    104                     </ItemTemplate> 
    105                 </asp:Repeater> 
    106             </td> 
    107         </tr> 
    108     </ItemTemplate> 
    109     <FooterTemplate> 
    110         </table> 
    111     </FooterTemplate> 
    112 </asp:Repeater> 
    113 <div id="SearchResults" style="padding: 0"
    114     <div id="searchResults" style="padding: 0"
    115         <div class="searchResultsPagerButtons" style="padding: 0"
    116             <sfWeb:Pager ID="pager1" runat="server"
    117                 <LayoutTemplate> 
    118                     <asp:Repeater ID="PageRepeaterLinkButton" runat="server"
    119                         <HeaderTemplate> 
    120                             <ol class="sf_pager"
    121                                 <li style="padding-right: 0; padding-left: 0"
    122                                     <asp:LinkButton ID="PreviousPage" CssClass="searchResultsPagePrevious" runat="server" 
    123                                         Text="<%$Resources:PreviousPage %>" Style="padding-right: 10px; padding-left: 0; 
    124                                         text-decoration: none"></asp:LinkButton></li
    125                         </HeaderTemplate> 
    126                         <ItemTemplate> 
    127                             <li style="padding-right: 3px; padding-left: 0"
    128                                 <asp:LinkButton ID="SingleItem" runat="server" Style="text-decoration: none" /> 
    129                             </li> 
    130                         </ItemTemplate> 
    131                         <FooterTemplate> 
    132                             <li style="padding-right: 0; padding-left: 0"
    133                                 <asp:LinkButton ID="NextPage" CssClass="searchResultsPageNext" runat="server" Text="<%$Resources:NextPage %>" 
    134                                     Style="padding-right: 0; padding-left: 0; text-decoration: none"></asp:LinkButton></li
    135                             </ol> 
    136                         </FooterTemplate> 
    137                     </asp:Repeater> 
    138                     <asp:Repeater ID="PageRepeaterHyperLink" runat="server"
    139                         <HeaderTemplate> 
    140                             <ol class="sf_pager"
    141                                 <li> 
    142                                     <asp:HyperLink ID="PreviousPage" CssClass="searchResultsPagePrevious" runat="server" 
    143                                         Text="<%$Resources:PreviousPage %>"></asp:HyperLink></li
    144                         </HeaderTemplate> 
    145                         <ItemTemplate> 
    146                             <li> 
    147                                 <asp:HyperLink ID="SingleItem" runat="server" /> 
    148                             </li> 
    149                         </ItemTemplate> 
    150                         <FooterTemplate> 
    151                             <li> 
    152                                 <asp:HyperLink ID="NextPage" CssClass="searchResultsPageNext" runat="server" Text="<%$Resources:NextPage %>"></asp:HyperLink></li
    153                             </ol> 
    154                         </FooterTemplate> 
    155                     </asp:Repeater> 
    156                 </LayoutTemplate> 
    157             </sfWeb:Pager> 
    158         </div> 
    159     </div> 
    160 </div> 
    161  

    Please note the references to SearchResults is because we're using the same CSS as for the search results page. 

    Regards,
    Jacques

  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 Dec 2009
    Link to this post
    Hello J.Hov,

    The problem does not come from the template, you can see this by applying it to the test project I sent you.
    "I would like to request the whole project and its databse backup, since we cannot reproduce this problem. I think that this is the best way for us  to see what is going wrong. You can open a support ticket and attach the files."


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    21 Dec 2009
    Link to this post
    Hi Ivan,

    These clients are not the kind of clients who just just backup an entire database and it's application files and send it off to someone. 

    I'll see what I can figure out. 

    Jacques
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Dec 2009
    Link to this post
    Hi J.Hov,

    I am sorry, but in this case we are out of ideas what the problem is.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
10 posts, 0 answered