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

Posted by Community Admin on 04-Aug-2018 20:35

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

All Replies

Posted by Community Admin on 03-Apr-2014 00:00

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?

Posted by Community Admin on 06-Apr-2014 00:00

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
 

Posted by Community Admin on 07-Apr-2014 00:00

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

Posted by Community Admin on 08-Apr-2014 00:00

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
 

Posted by Community Admin on 08-Apr-2014 00:00

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

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

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
 

This thread is closed