Read more link showing blank page

Posted by Community Admin on 04-Aug-2018 09:16

Read more link showing blank page

All Replies

Posted by Community Admin on 05-Apr-2013 00:00

Hi,
Ive been working with the built in news widget and I've editted the template to have a 'read more' link using the 'ItemDefaultUrl' but when I click on the link it just brings up a blank page. No errors just an empty page.

How do I make the link open the relevant news article from the news module?

O.

Posted by Community Admin on 05-Apr-2013 00:00

Hi Owain,

If you want a 'Read More' link inside your NewsList template, you can use the following markup to point directly to the news details.

<sf:DetailsViewHyperLink ID="FullStory" Text="<%$ Resources:NewsResources, FullStory %>" runat="server" CssClass="sfnewsFullStory" />

Just past it somewhere inside your template. As you can see it uses the Resources to set the Text property. You can either change this in the backend (Interface labels & Messages) or hard-code it yourself.

Kind regards,
Daniel

Posted by Community Admin on 05-Apr-2013 00:00

Thanks for the quick reply - I tried your solution but it's returning a page not found when I click on the link.
Exception Details: System.Web.HttpException: Page not found

I wasn't sure where in the backend I could change the Text Property so just hardcoded the 'Read more' text.

Posted by Community Admin on 05-Apr-2013 00:00

Hi Owain,

So how did you configured the News Widget? Is it all default?
Do you point to a separate page that holds a News View, or are you automatically render the News details on the same page?

Kind regards,
Daniel

Posted by Community Admin on 05-Apr-2013 00:00

Hi,
Yes, all set up as default and the news is rendered automatically.

Posted by Community Admin on 05-Apr-2013 00:00

Hi Owain,

Could you maybe share the code of your template?

Kind regards,
Daniel

Posted by Community Admin on 05-Apr-2013 00:00

<%@ Control Language="C#" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit"
    Assembly="Telerik.Sitefinity" %>
<telerik:RadListView ID="DetailsView" ItemPlaceholderID="ItemContainer" AllowPaging="False"
    runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
    <layouttemplate>
        <div class="sfnewsDetails">
            <%-- <div class="sfnewsLinksWrp">
                <sf:MasterViewHyperLink class="sfnewsBack" Text="<%$ Resources:NewsResources, AllNews %>" runat="server" />
            </div> --%>
            <asp:PlaceHolder ID="ItemContainer" runat="server" />
        </div>
    </layouttemplate>
    <itemtemplate>
 
        <h1 class="sfnewsTitle">
            <asp:Literal Text='<%# Eval("Title") %>' runat="server" />
        </h1>
        <div class="sfSCSnewsAuthorAndDate">
 <sf:FieldListView ID="PublicationDate" runat="server"
                Format="PublicationDate.ToLocal():MMM dd, yyyy" />
      </div><br/>
        <sf:ContentBrowseAndEditToolbar ID="BrowseAndEditToolbar" runat="server" Mode="Edit,Delete,Unpublish"></sf:ContentBrowseAndEditToolbar>
         
       
      <sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Summary")%>' />
       
      <%--  <div class="sfnewsContent">
            <asp:Literal ID="Literal1" Text='<%# Eval("Content") %>' runat="server" />
        </div> --%>
       
      <sf:DetailsViewHyperLink ID="FullStory" Text="Read more" runat="server" CssClass="sfnewsFullStory" />
       
      <%-- <a href='<%# Eval("ItemDefaultUrl")%>'>Read more</a> --%>
 
    <asp:PlaceHolder ID="socialOptionsContainer" runat="server">
   
    </asp:PlaceHolder>
 
    </itemtemplate>
</telerik:RadListView>
Yip, no problem at all:

Posted by Community Admin on 05-Apr-2013 00:00

Hi Owain,

Well, that is strange.
What I see is that you add the Read More link to the DetailView, which makes no sense to me, as this template is already used for displaying the News details.

I'm not sure what goes wrong. Can you debug it with Firebug / Fiddler to see if any request goes wrong?

I tested the same situation. Adding the Read More link to a DetailView is not causing troubles, since it just redirects to the same page.

What is the URL that the Read More link is navigating to?

Kind regards,
Daniel

Posted by Community Admin on 05-Apr-2013 00:00

Hi Daniel,
Still learning my way around Sitefinity, sorry if I've done this the wrong way.
The link points to :
mydomain/.../recruitment-of-members

But I would prefer it not to have the date format in front of it and I wonder if this is what is causing the issue as the news module has a URL as 'recruitment-of-members' - it used to have allow multiple URLs for this item enabled and it did have 2013/03/21/recruitment-of-members within the box and if I expand the More options panel in the news module I can see that under 'All additional URLs redirect to the default one:'
The default seems to be '/2013/03/21/recruitment-of-members'

Posted by Community Admin on 05-Apr-2013 00:00

Hi Owain,

You could try to test it by removing the additional url's and uncheck that checkbox.
See what happens.

It is a bit difficult for me to debug this issue.

Kind regards,
Daniel

Posted by Community Admin on 05-Apr-2013 00:00

Thanks for your help with this, I should have been more clear. I have unchecked these options - tested and also clicked the boxes and tested again. Still doesnt work. Also just created a new news article and then tried that but it still brings up a page not found error.

What I may do is see about publishing it to another page and see if that helps. I was more just wanting to see if I had done the read more link correctly which you kindly pointed me in the right direction, I will now try and get the rest to work.

Posted by Community Admin on 05-Apr-2013 00:00

Update: I pointed the link to a new page instead of the homepage and it all works now! Very odd. Thanks again for your help!

O.

Posted by Community Admin on 05-Apr-2013 00:00

Hi Owain,

Glad it worked out for you.
Still a strange thing, you might want to contact support about it?

Kind regards,
Daniel

Posted by Community Admin on 05-Apr-2013 00:00

Thanks.
Sometimes I do think we have a slightly flawed installation of Sitefinity - I have a number of tickets open with them for little issues which shouldnt be present but that is another project in it owns!

Posted by Community Admin on 09-Apr-2013 00:00

Hello Owain,

I have tested this on my end by dropping a news widget and pasting your template and the link seems to work properly.

Would it be possible for you to share a screenshot of the whole error you are presented with (or a video on how this is setup and reproducing the problem)? Also can you elaborate a bit on your scenario? We might be able to provide another solution for this.

Regards,
Pavel Benov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 10-Apr-2013 00:00

Hi Pavel,
Not a problem to give you a screen shot - I have a number of 'issues' I am working through with our site with different members of support so I may be delayed but as soon as I get a chance I will post here.

O.

Posted by Community Admin on 10-Apr-2013 00:00

Hi Owain,

Thanks for taking the time for this. Looking forward to your reply. 

All the best,
Pavel Benov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed