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

Forums / Bugs & Issues / Blog Error: Ambiguous column name 'DateCreated'

Blog Error: Ambiguous column name 'DateCreated'

7 posts, 0 answered
  1. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    26 Feb 2009
    Link to this post
    In upgrading from 3.2 to 3.6 (hotfix 1 now applied) I am now encountering the following error when trying to access the blog on our Sitefinity site that was working previously:

    Property accessor 'CommentsCount' on object 'Telerik.Blogs.Data.Blog' threw the following exception:'Ambiguous column name 'DateCreated'.'

    Any thoughts?

    Thanks,

    Zack

  2. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    26 Feb 2009
    Link to this post
    Forgot to note that it is only in the Admin interface that I am having trouble accessing the blog.

    Thanks,

    Zack
  3. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    27 Feb 2009
    Link to this post
    Hello Zack,

    I cannot reproduce this problem

    Could you tell us the following:

    1. Do you encounter the error when you try to see the List of Blogs or when you try to see the posts for a given blog

    2. Do you use external template for Blogs module - BlogsListView, PostLists or any other template. If so please send us the templates you have mapped and how you have mapped the in the config file.

    Any additional information will be appreciated.

    Best wishes,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    27 Feb 2009
    Link to this post
    Stoyanka,

    I run into this particular problem when I try to view the list of blogs.

    I am only mapping one template, and that is for Lists.  The contents of the config file and template are listed at the end of this message.

    I also tried to access the list of blogs without mapping any templates at all, still no luck (I had never at any point mapped any Admin templates anyway, so I'm reasonably certain this isn't the problem).

    There are a couple of other issues that I'm struggling with at the moment as well ...

    1) Once I map a template, shouldn't I be able to override what template is used for a given ListXXXX control by simply setting a different value in the ExpandableListTemplatePath property value for that control?  At present I am not able to do that successfully either.

    2) When trying to create a feed of news items and specifying that I only want the Title and Summary, I am not able to change the number of characters I want for the summary.  No matter what I do, it seems to always default back to 500, and the feed always sends back the title and all of the content.  I also tried selecting title only as well but I still get back the title and all of the content.  I made sure that caching was NOT selected and even tried resetting the app pool and IIS after changing that ... again ... no luck.

    3) Was wondering why, when creating a feed, we are able to choose a category of news items but we cannot choose a category of blog posts.  It would be nice if both data sources were treated the same in this regard.

    Thanks for your help so far,

    Zack


    Template Mapping Config file content:

    <?xml version="1.0" encoding="utf-8"?>
    <controlsConfig>
      <viewMap>
        <viewSettings hostType="Telerik.Lists.WebControls.ListDisplay">
          <additionalTemplates>
            <!--Expandable list-->
            <add key="ExpandableListTemplatePath" layoutTemplatePath="~/CustomControlTemplates/Lists/FAQ_ExpandableListTemplate.ascx" />
          </additionalTemplates>
        </viewSettings>
      </viewMap>
    </controlsConfig>

    Custom Template content:

    <%@ Control Language="C#" %>
    <telerik:CssFileLink ID="CssFileLink1" EmbeddedFileName="Telerik.Lists.Resources.ControlTemplates.Frontend.listsCommonLayout.css" FileName="" Media="screen" runat="server" />
    <telerik:JsFileLink ID="JsFileLink1" EmbeddedFileName="Telerik.Lists.Resources.ExpandableList.js" FileName="" runat="server" />

    <div class="Copy">
    <asp:Repeater ID="lists" runat="server">
        <ItemTemplate>
            <h2 style="color:#990000;font-size:1em;" class="sf_listTitle"><asp:Literal ID="listTitle" runat="server"></asp:Literal></h2>
            
            <p class="sf_controlListItems">
                <a id="expandAll" runat="server">
                    <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:ExpandAll %>"></asp:Literal>
                </a>
                <a id="collapseAll" runat="server" style="display:none;">
                    <asp:Literal ID="Literal2" runat="server" Text="<%$Resources:CollapseAll %>"></asp:Literal>
                </a>
            </p>
            
            <div>
            
            <ul class="sf_expandableList" id="expandableList" runat="server">
                <asp:Repeater ID="listItems" runat="server">
                    <HeaderTemplate>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <li class="Bold">
                            <p id="headlineContainer" style="font-size:1em;" runat="server" class="sf_listItemTitle">
                                <a id="headline" runat="server" title="<%$Resources:ClickToExpand %>"></a>
                            </p>
                            <div id="contentContainer" runat="server" class="sf_listItemBody" style="display:none; font-weight:normal;">
                                <asp:Literal ID="content" runat="server"></asp:Literal>
                            </div>
                        </li>
                    </ItemTemplate>
                    <FooterTemplate>
                    </FooterTemplate>
                </asp:Repeater>
            </ul>
    </div>
        </ItemTemplate>
    </asp:Repeater>

    </div>

  5. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    02 Mar 2009
    Link to this post
    Sitefinity,

    Do you have any new feedback re: my detailed reply from Friday?  I am presently working on tracing the SQL so I can provide you with a little better detail about my problem but just wanted to know if you'd had a chance to look over the information I posted and whether or not you were able to determine anything from it.  I will post the SQL trace information as soon as I have it.

    Thanks,

    Zack
  6. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    03 Mar 2009
    Link to this post
    So the primary issue for me at this point is that I can't get to the list of Blogs in the Sitefinity Admin interface on my site ... when I try to access it here is the SQL that is generated (I intentionally masked out the Guid value for obvious security reasons) 

    -----------------Start Query ------------------------

    SELECT Application,ID,TextValue,Author,Email,WebSite,Visible,DateCreated,IpAddress,Owner,CntID AS 
    NN_TABLE_ID_1, [dbo].[sf_CmsComment].[Application], [dbo].[sf_CmsComment].[ID], [dbo].[sf_CmsComment].[TextValue], [dbo].[sf_CmsComment].[Author], 
    [dbo].[sf_CmsComment].[Email], [dbo].[sf_CmsComment].[WebSite], [dbo].[sf_CmsComment].[Visible], [dbo].[sf_CmsComment].[DateCreated], 
    [dbo].[sf_CmsComment].[IpAddress], [dbo].[sf_CmsComment].[Owner], [dbo].[sf_CmsComment].[CntID]
        , Application,ID,MimeType,ParentID,Url,LoweredUrl,CommentsCount,ItemInfo AS NN_TABLE_ID_2, 
    [dbo].[sf_CmsContentBase].[Application], [dbo].[sf_CmsContentBase].[ID], [dbo].[sf_CmsContentBase].[MimeType], 
    [dbo].[sf_CmsContentBase].[ParentID], [dbo].[sf_CmsContentBase].[Url], [dbo].[sf_CmsContentBase].[LoweredUrl], 
    [dbo].[sf_CmsContentBase].[CommentsCount], [dbo].[sf_CmsContentBase].[ItemInfo]
        
        FROM [dbo].[sf_CmsComment] LEFT OUTER JOIN [dbo].[sf_CmsContentBase] ON ([dbo].[sf_CmsComment].[Application] = 
    [dbo].[sf_CmsContentBase].[Application] AND [dbo].[sf_CmsComment].[CntID] = [dbo].[sf_CmsContentBase].[ID])  WHERE ( 
    ([dbo].[sf_CmsComment].[Application] = '/Blogs' ) AND ( [dbo].[sf_CmsContentBase].[ParentID] = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' ) ) ORDER BY DateCreated

    -----------------End Query ------------------------

    This query fails in Query Analyzer and gives me the following error:

    ----------------- Start Error ------------------------

    Msg 209, Level 16, State 1, Line 1
    Ambiguous column name 'Application'.
    Msg 209, Level 16, State 1, Line 1
    Ambiguous column name 'ID'.
    Msg 209, Level 16, State 1, Line 1
    Ambiguous column name 'DateCreated'.
    Msg 209, Level 16, State 1, Line 1
    Ambiguous column name 'Owner'.
    Msg 209, Level 16, State 1, Line 1
    Ambiguous column name 'Application'.
    Msg 209, Level 16, State 1, Line 1
    Ambiguous column name 'ID'.

    -----------------  End Error ------------------------

    Because of the nature of error (query doesn't even execute), I am inclined to think that we are looking at an issue in the code somewhere, as opposed to an issue with a display template.  Please let me know what you find and if I can be of any help in tracking down this issue.

    Thanks,

    Zack 
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    04 Mar 2009
    Link to this post
    Hi Zack,

    We send a reply to your bug report. We need to investigate your project locally.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
7 posts, 0 answered