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

Forums / Bugs & Issues / Update from 5.0 - 5.2, News does not exist in the namespace Telerik.SiteFinity

Update from 5.0 - 5.2, News does not exist in the namespace Telerik.SiteFinity

6 posts, 0 answered
  1. Brian
    Brian avatar
    15 posts
    Registered:
    23 Apr 2009
    03 Apr 2014
    Link to this post

    I've just updated a portal for a new client running SiteFinity from 5.0 - 5.2 on the path to update fully to 6.3, updated via Project Manager, did all the web config and project changes, and I'm trying to compile and I get this error:

     Error 24 The type or namespace name 'News' does not exist in the namespace 'Telerik.Sitefinity' (are you missing an assembly reference?) 

    and

    Error 26 'Telerik.Sitefinity.Fluent.FluentSitefinity' does not contain a definition for 'NewsItems' and no extension method 'NewsItems' accepting a first argument of type 'Telerik.Sitefinity.Fluent.FluentSitefinity' could be found (are you missing a using directive or an assembly reference?)

    Here's the code it references in controls/newsItem.ascx.cs:

     Telerik.Sitefinity.News.Model.NewsItem newsItem = App.WorkWith().NewsItem(NewsBaseId).Get();

     Any ideas?

  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    06 Apr 2014
    Link to this post
    Hi Brian,

    Please check and ensure that the references (including in your custom projects in the solution, if any) are correct. You need to add using in your code to Telerik.Sitefinity.dll as there is braking changes related, in Sitefinity 5.1. More information could be found in that article.

    In addition, you could also try to use the Native API. Query news examples could be found here.

    Regards,
    Svetoslav Manchev
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Brian
    Brian avatar
    15 posts
    Registered:
    23 Apr 2009
    07 Apr 2014 in reply to Svetoslav Manchev
    Link to this post

    The news sections are not in the SiteFinity DLL any more, I looked in the object browser, they had been removed (see attached).  

  4. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    08 Apr 2014
    Link to this post
    Hello Brian,

    I have check the following example on Sitefinity version 5.2 and it works fine:
    using System;
    using System.Linq;
    using Telerik.Sitefinity;
    using Telerik.Sitefinity.News.Model;
     
    namespace SitefinityWebApp.Examples
    {
        public partial class TestSamples : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                var newsBaseId = new Guid("ec9f30fe-1906-4d8c-99ae-212066192cfe");
                var item = GetNews(newsBaseId);
            }
     
            protected NewsItem GetNews(Guid newsBaseId)
            {
                Telerik.Sitefinity.News.Model.NewsItem newsItem =
                    App.WorkWith().NewsItems().Get().Where(i => i.Id == newsBaseId).FirstOrDefault();
     
                return newsItem;
            }
        }
    }

    Please check if you have the correct dlls (you could get them from the _EmptyFolder of version 5.2), check also if the references are correct and if you have any bindings in the web.config.

    Regards,
    Svetoslav Manchev
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  5. Brian
    Brian avatar
    15 posts
    Registered:
    23 Apr 2009
    08 Apr 2014 in reply to Svetoslav Manchev
    Link to this post

    I have resolved this, somehow the project lost the reference to Telerik.SiteFinity.ContentModules, I re-added it.  When I do a clean build some DLLs get deleted in the bin folder, I have a backup and have to copy them back, any way to fix that? 

    The latest issue I am trying to resolve is going from 6.1 to 6.3 I get this error:

    The configuration 'DynamicModulesConfig' is not registered

  6. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    07 Dec 2016
    09 Apr 2014
    Link to this post
    Hello Brian,

    I have answer you in the support ticket. Once we have resolution, you could share it with the community.

    Regards,
    Svetoslav Manchev
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
6 posts, 0 answered