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

Forums / Developing with Sitefinity / create a provider to share content from one site to another

create a provider to share content from one site to another

13 posts, 0 answered
  1. matt Sword
    matt Sword avatar
    22 posts
    Registered:
    17 Mar 2010
    02 Sep 2010
    Link to this post
    Is there any way to share a news provider from one site to another? I want to share news from one site to the other divisions.

    I've tried the following.

    1. create new connection string to DB
    2. new connection under <telerik><dataAccess><connections2. new connection under <telerik><dataAccess><connections>
    <add name="MyCustom" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="MyCustom" />
    3.Added connectionstringname under <cms defaultProvider="Sitefnity">
    <add connectionStringName="MyCustom" applicationName="/Executive" allowPageHistory="true" allowPageWorkflow="false" cachingProviderName="ASPNET" name="MyCustom" type="Telerik.Cms.Data.DefaultProvider, Telerik.Cms.Data"/>
    4. Added a new Provider under generic content
    <add name="Executive"
                urlRewriteFormat="[Title].aspx"
                urlDateTimeFormat="yy-MM-dd"
                urlWhitespaceChar="_"
                visible="False"
                defaultMetaField="Title"
                securityProviderName=""
                allowVersioning="True"
                applicationName="/Executive"
                versioningProviderName=""
                commentsModeration="true"
                connectionStringName="MyCustom"
                type="Telerik.News.Data.DefaultNewsProvider, Telerik.News.Data" />
    5. Added a news provider
    <add providerName="Executive" publicationDateField="Publication_Date" expirationDateField="Expiration_Date" thumbnailUrlField="Thumbnail" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" />

    And I get a response like this
    Left operand 'Publication_Date' is not supported. Supported left operands are :
    • ID
    • Tag.ID
    • Tag.Name
    • ParentID
    Left operand 'Expiration_Date' is not supported. Supported left operands are :
    • ID
    • Tag.ID
    • Tag.Name
    • ParentID

    Is it even possible to do what I'm trying to do? Am I close? Any help is appreciated.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Sep 2010
    Link to this post
    Hello matt Sword,

    You do not have to add a provider under <cms> node. The provider should be added inside

    <cmsEngine defaultProvider="Generic_Content">
                <providers>
                    <clear />

    then registered under <news> section. Note that there is a bug in the Tagging and you will not see the tags properly when you share the content.

    You can take a look at

    Share News content across multiple Sitefinity sites
    Run Multiple Community Editon Sites from one SQL2009 Database?



    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. matt Sword
    matt Sword avatar
    22 posts
    Registered:
    17 Mar 2010
    03 Sep 2010
    Link to this post
    Ivan I still receive same issue. this is what I have in my Web.config

    1. Connection string
    <add name="MyCustom" connectionString="data source=sqldev;UID=name;PWD=pass;initial catalog=2010Website" providerName="System.Data.SqlClient" />
    2. dataAccess node entries
    <dataAccess defaultConnection="DefaultConnection">
                <connections>
                    <add name="DefaultConnection" driver="Telerik.DataAccess.Providers.ExtendedSqlServer2005Provider, Telerik.DataAccess" connectionStringName="Sitefinity" />
                    <add name="GenericContentConnection" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="Sitefinity" />
            <add name="ExecutiveContentConnection" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="MyCustom" />
     
          </connections>
    3.< cmsEngine ><providers>
    <add name="Executive"
               urlRewriteFormat="[Title].aspx"
               urlDateTimeFormat="yy-MM-dd"
               urlWhitespaceChar="_"
               visible="False"
               defaultMetaField="Title"
               securityProviderName=""
               allowVersioning="True"
               applicationName="/Executive"
               versioningProviderName=""
               commentsModeration="true"
               connectionStringName="ExecutiveContentConnection"
               type="Telerik.News.Data.DefaultNewsProvider, Telerik.News.Data" />
    4. <news>
    <news defaultGenericProvider="News">
                <genericContentProviders>
                    <add providerName="News" publicationDateField="Publication_Date" expirationDateField="Expiration_Date" thumbnailUrlField="Thumbnail" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" />
            <add providerName="Executive" publicationDateField="Publication_Date" expirationDateField="Expiration_Date" thumbnailUrlField="Thumbnail" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" />
     
          </genericContentProviders>
            </news>

    I then add a news view control to the page and change the provider name to Executive and I get the early stated result.

    Am I missing something?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    03 Sep 2010
    Link to this post
    Hello matt Sword,

    The error shows that you are using invalid FilterExpression of NewsView control. Could you open the control in edit mode and delete the FilterExpression. Let me know the result.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. matt Sword
    matt Sword avatar
    22 posts
    Registered:
    17 Mar 2010
    03 Sep 2010
    Link to this post
    yes that seem to fix that issue, but now I get The manager does not support categorization yet!

    I fixed this by adding the MetaField definitions. The item I was trying to share was actually a custom news module.

    that did it. thanks!
  6. matt Sword
    matt Sword avatar
    22 posts
    Registered:
    17 Mar 2010
    03 Sep 2010
    Link to this post
    oh Wait! What do I need to do to have pictures come across too?

    I get this for my news Item image. I don't customizing a template to point to the provider site, but it say item not found
    src="Item%20not%20found:%20[Libraries]34dc5fbf-e50f-4280-ad3d-e358689de7d1"

    Any ideas?
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    03 Sep 2010
    Link to this post
    Hi matt Sword,

    It looks like the other provider has used the same name "Libraries" as the default provider and now the dynamic url engine is trying to get it from the default one. The provider in the  brackets should be the new one [Executive] .

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. matt Sword
    matt Sword avatar
    22 posts
    Registered:
    17 Mar 2010
    03 Sep 2010
    Link to this post
    Ivan
    So are you saying that I need to create  a custom library provider which my "Executive" news provider will use to pull images from the source?

    Matt
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    03 Sep 2010
    Link to this post
    Hello matt Sword,

    No I am not saying that. You news provider is looking for an image in the current Libraries provider with the specified ID thrown in the error. In your current Libraries provider you do no have this image with the same ID.
    You have to reupload images and set IContent ID to be the same as this one used for an image from your otherwebsite or update the items manually and set the images again.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. matt Sword
    matt Sword avatar
    22 posts
    Registered:
    17 Mar 2010
    03 Sep 2010
    Link to this post
    Ivan,
    Much appreciated.
     Doesn't uploading images to another library defeat the purpose of "Shared" content? In this case there are not many pictures, but how would i manage 1000's of products for a catalog?

    regards
    Matt
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    03 Sep 2010
    Link to this post
    Hello matt Sword,

    If the provider of the other website has not be named "Libraries" you would be able to connect it and you would have shared images and shared content that will pick these images. In this case having 10000 images would not be a problem.

    There is no problem if you have content that does not uses data from other providers which are not added to the current instance. Furthermore Libraries provider is a separate provider and it is normally that when you use both providers and break the relation between them to get such results, since the item from Libraries provider is not represented in the current application. The CMS cannot know that you have one  or more whebsites and where you have shared some data. The CMS is looking in the context of the current application. The news item correctly is trying to find the image from Libraries provider, but the current one, not inside the base of the other website.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. matt Sword
    matt Sword avatar
    22 posts
    Registered:
    17 Mar 2010
    03 Sep 2010
    Link to this post
    Ivan,

    sorry, to beat this to death, but I tried changing the provider name. I can view the images in the "source", but when I consume it from another site I get this still (notice the provider name is different than "Libraries")
    src="Item%20not%20found:%20[lib]4822d8a8-0bac-4518-958e-c8f107a9d8c5"

    Matt
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Sep 2010
    Link to this post
    Hello matt Sword,

    The images will always in the source, but the problem is that the application is looking for a provider that exists in the website you use to share content and such provider cannot be found. The item will not be found until you have the same provider and an item with the same id that is shown in the HTML.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
13 posts, 0 answered