Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Richard Adams 5 posts 45 karma points
    Sep 24, 2013 @ 10:18
    Richard Adams
    0

    Version 4.7.2 - Tags not persisted to database

    Version information

    Umbraco version 4.7.2

    .Net 4.0

    Windows Server 2008 r2

    SQL Server 2008 r2

    Hi,

    I have inherited a Umbraco project. I have some experience with Umbraco in the pastI am currently looking at using the API to retrieve all documents that have been tagged with a specific tag. 

    Using the api method cms.businesslogic.Tags.Tag.GetDocumentsWithTags("sometagvalue");

    I am able to make the call successfully, however it never returns any results. 

    On futher investigation I found that GetDocumentsWithTags queries the following tables:

    [cmsTags]

    [cmsTagRelationship]

    So I checked in the tables and found that the tables were empty.

    There is a data type setup using the default tag data type and in the admin interface documents are successfully tagged and the relationship is persisted somewhere but I can't figure out where if not in the cmsTags table.

    Has anyone run into similar problems or does anyone have any suggestions as to what I might be doing wrong?

    Thanks in advance,

     

    Richard.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Sep 25, 2013 @ 18:07
    Tim
    100

    Hiya,

    If it's using the default tagging DataType and there are tags showing up in the CMS, then there should be records in cmsTags, as that's what the built in tags control uses to store al of the tags in. There should also be records in cmsTagRelationship.

    It's possible that someone has set the tag data type to a custom one that is storing the tags elsewhere I guess. Check the DocumentType for the pages with the tags and double check that the property for the tags is actually using the default tags data type. If it isn't, what type is it using?

  • Richard Adams 5 posts 45 karma points
    Sep 26, 2013 @ 12:07
    Richard Adams
    0

    Hi Tim,

    Thanks for the reply. I looked up the data type and it is actually a data type called TagPicker.

    I am now trying to figure out if this is a data type from an extension, part of core, or something that they had added themselves.

    Have you by any chance come across a data type called Tag Picker, or could you point me in the direction where a custom data type maybe store in the db.

    Thanks,

    Richard.

  • Richard Adams 5 posts 45 karma points
    Sep 27, 2013 @ 11:25
    Richard Adams
    0

    Hi Tim,

    Yes so it looks like they are not using the default tagging framework, but instead they have their own customer data types for tagging, so it makes perfect sense that the data is not store in the database.

     

    Thanks for you help.

    Richard.

     

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Sep 30, 2013 @ 10:38
    Tim
    0

    No worries! The built in tagging in 4.7.2 was a bit temperamental, so a lot of people used alternatives if they had any serious tagging requirements. Some of them do use the underlying tags tables, but not all. The tagging controls were massively improved recently and work really well out of the box now in newer versions of Umbraco :)

Please Sign in or register to post replies

Write your reply to:

Draft