Copied to clipboard

Flag this post as spam?

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

  • Ismail Mayat 4489 posts 10011 karma points MVP 2x admin c-trib
    1 week ago
    Ismail Mayat

    Set tags not adding to cmsTags and cmsTagRelationShip tables

    Using v7.15.4 and using tags set as csv and in content pre save event I am doing:

    string tagPropertyAlias = Alert.GetModelPropertyType(x => x.ServiceNumber).PropertyTypeAlias;
                //its stored as json array but cannot get it back as array so have to use string manipulation
                var serviceNumbers = content.GetValue<string>(tagPropertyAlias).Replace("[","").Replace("]","");
                if (!string.IsNullOrEmpty(serviceNumbers) && serviceNumbers.Contains(","))
                    var badTags = serviceNumbers.Split(',');
                    List<string> goodTags = badTags.ToList();
                    //do we need to re add to tag manager??

    I am doing this because I want users to be able to paste csv list of values see where if you do this then you get funny results see .

    So I have done it this way instead and it saves into content and it appears correctly in backoffice however the relation ships are not there, it seems as though set tags is not adding the relationships.

Please Sign in or register to post replies

Write your reply to: