Mismatched Authors When a News item is created

Posted by Community Admin on 04-Aug-2018 19:51

Mismatched Authors When a News item is created

All Replies

Posted by Community Admin on 06-Jan-2012 00:00

Hello all, quick question.  Whenever I create a news item, and add the authors name in the "Author" field under "Additional info" lets say, Tom Jones, it displays correctly on the News feed list.  However when you click to read the whole news article, the authors name is incorrect.  Instead of it being Tom Jones, it is the user-name of the person that created the News item from the sitefinity backend.  How do I make it so that both pages show the correct Author, in this case Tom Jones, instead of "User-name."
Thanks!

Posted by Community Admin on 11-Jan-2012 00:00

Hello Jeff,

As you properly pointed out, by default we are displaying the content item Owner (that is the Sitefinity user who created the article), however you can easily change this to display the value in your Author field by editing the widget template you are using (either from Design->Widget templates and choose the desired template or by editing the widget and the corresponding template.In the template look for the line saying:

<sf:PersonProfileView runat="server" />
Comment that out or delete it and substitute it with:
<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Author")%>' />
Save the charges and you should have the Author filed value displayed instead of the User who created the item. If there's anything else we can help you with, please let us know.

Greetings,
Boyan Barnev
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 11-Jan-2012 00:00

Hello and thank you for responding.  However, I do not see any mention of the line of code you have said to replace.  Below is a copy of my template.  I already have the author field in the template, but as I had stated previously, when I bring up the full story, it is still displaying the name of the content creator, but not the name of the Author that was eneterd into the Author field.

<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Author")%>' /><%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
 
<telerik:RadListView ID="NewsList" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
 
    <LayoutTemplate>
        <sf:ContentBrowseAndEditToolbar ID="MainBrowseAndEditToolbar" runat="server" Mode="Add"></sf:ContentBrowseAndEditToolbar>
        <ul class="sfnewsList sfnewsListTitleDateSummary">
            <asp:PlaceHolder ID="ItemsContainer" runat="server" />
        </ul>
    </LayoutTemplate>
    <ItemTemplate>
        <li class="sfnewsListItem">
            <h2 class="sfnewsTitle">
                <sf:DetailsViewHyperLink ID="DetailsViewHyperLink1" TextDataField="Title" ToolTipDataField="Description" runat="server" />
            </h2>
            <sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Author")%>' />
            <div class="sfnewsMetaInfo">
                <sf:FieldListView ID="PublicationDate" runat="server" Format="PublicationDate.ToLocal():MMM dd, yyyy" />
            </div>
 
            <sf:FieldListView ID="summary" runat="server" Text="0" Properties="Summary" WrapperTagName="div" WrapperTagCssClass="sfnewsSummary"  />
 
            <sf:DetailsViewHyperLink ID="FullStory" Text="Full story" runat="server" CssClass="sfnewsFullStory" />
            <sf:ContentBrowseAndEditToolbar ID="BrowseAndEditToolbar" runat="server" Mode="Edit,Delete,Unpublish"></sf:ContentBrowseAndEditToolbar>
        </li>
    </ItemTemplate>
</telerik:RadListView>
<sf:Pager id="pager" runat="server"></sf:Pager>

Thanks!

Posted by Community Admin on 11-Jan-2012 00:00

Hi Jeff,

You seem to be editing the ListView template, please edit the SingleItem template.

Kind regards,
Boyan Barnev
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 11-Jan-2012 00:00

Duh! My goodness, didn't even realize I was continually trying to only make edits to that one template.  Thanks so much for the help!

This thread is closed