Search screen Pager links contain class references

Topics: Troubleshooting
Nov 4, 2011 at 3:51 PM

I know I've seen this error around before, but I can't find anything in discussions or workitems here; does anyone know what's going on or how to fix it?

The pager links are looking like this:

Nov 4, 2011 at 3:53 PM

Note: I have overridden the Search/Index.cshtml template in my theme. As far as I can see, nothing I've done should have changed the pager behaviour. My overridden template is as follows:

@model Orchard.Search.ViewModels.SearchViewModel
    IEnumerable<object> searchResults = null;
    if (Model.ContentItems!=null) 
        searchResults = Model.ContentItems;
    var pages = (int)Math.Ceiling((float)Model.TotalItemCount / (float)Model.Pager.PageSize);
<div class="main-content search-results">
    @if (searchResults!=null) {
        if (searchResults.Count() == 0) { 
            <div class="inner-content">
                <h2>@T("No results found!")</h2>
                <p>@T("Sorry, we couldn't find anything matching that on our network. Please try another search query.")</p>
        } else { 
            <p class="search-summary">@Display(Model.Pager) @T.Plural("1 Page","{0} Pages", pages)</p>
        <div class="clear"></div>

Nov 4, 2011 at 3:56 PM

It's a bug in MV3, and it's trigger for home pages. If you look into the Pager shape in Core, you will find the hack/fix. By the way, the pager Shape has been refactored (a lot) in 1.x.