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

Forums / Bugs & Issues / Tags with multiple providers

Tags with multiple providers

3 posts, 1 answered
  1. Webteam
    Webteam avatar
    28 posts
    Registered:
    30 Nov 2009
    16 Aug 2010
    Link to this post

    I have a problem using tags when I have multiple providers setup, in that tagging only works properly for the default provider.

    for example in web.config say I have

    <telerik>

    <dataAccess defaultConnection="SharedConnection">

    <connections>

    <add name="RoleConnection" driver="Nolics.ORMapper.DataProviders.SqlServer2005Provider" connectionStringName="RoleSpecific"/>

    <add name="SharedConnection" driver="Nolics.ORMapper.DataProviders.SqlServer2005Provider" connectionStringName="Shared"/>

    The two connections above reference different connection strings which point to 2 seperate databases.

    Now, if I go into the admin section of the site, navigate to a library within images and document and click on tags, the counts for both Roles Provider and Shared Provider will be correct, but if I click on the tag, only shared provider will show any documents (as it is set as default), if I switch RoleProvider to default then only it will show documents by tag.

    Where this becomes a big problem is when pulling in documents via the codebehind, for example

    SharedItems = this.SharedManager.GetContent(0, 0, this.SortExpression, "someTag", library);

    RoleItems = this.RoleManager.GetContent(0, 0, this.SortExpression, "SomeTag", library);

    only one of these will return data, whichever one is set as default in the web.config.  If I leave out the tag then both will pull in all documents fine.

    I can work around this by leaving out the tag so all documents are returned and then using a loop such as the following, but this is very inconvenient.

     

    foreach (IContent content in RoleItems)

    {

    IList taglist = this.RoleManager.GetTags(content.ID);

    if (!(taglist.Contains(languageTag)))

    {

      .... do something

    }

    }

    please see attached screenshots as well...

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    17 Aug 2010
    Link to this post
    Hi David Desjardins,

    If the applicationName of the providers is the same they should share all data. When the applicationName is different the data will be separated.

    GetContent will return data specific for the provider and its applicationName. There is a bug with Tags when you use separate databases. If the providers are created in the same database there would not be a problem.

    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
    Answered
  3. Webteam
    Webteam avatar
    28 posts
    Registered:
    30 Nov 2009
    17 Aug 2010
    Link to this post
    We are using seperate databases for the providers so I guess that is the issue.  For now I am just working around the bug.
Register for webinar
3 posts, 1 answered