Copied to clipboard

Flag this post as spam?

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


  • Tom Fulton 2030 posts 4998 karma points c-trib
    Feb 03, 2013 @ 22:40
    Tom Fulton
    0

    Importing Tags - data is not published

    Hi Richard,

    I'm attempting to import a CSV of tags "tag1,tag2,tag3" from an SQL Server table using the standard Umbraco tags datatype.  After running the import, I can edit the node and see that the Tags appear in the datatype.

    However, on the front-end, the Tags property has no data until I manually Publish the node.  Selecting Auto-Publish or Publishing through the Umbraco context menu doesn't fix the issue - I have to manually publish each node in the UI.

    Digging deeper, it looks like the cmsPropertyData table never gets populated with the tags during the import.  After I manually publish, the table then has "tag1,tag2" as the value.  It seems the import creates the tags in cmsTags and cmsTagRelations, but the cmsPropertyData table and umbraco.config remain empty for that property.  I think what's happening is, the editContent page is populating the Tags list from the cmsTags table, and using that info when I Save to populate the tables/cache with the CSV value.  

    I'm guessing the field adapter for Tags is only creating the tags in the table, but not returning the tags as a string for the value.

    For now, I'm just manually publishing each of the pages to resolve - just thought I'd let you know about the issue.  I also thought about writing a custom FieldAdapter, but I wasn't sure if these could override built-in ones?

    Thanks,
    Tom

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 04, 2013 @ 08:10
    Richard Soeteman
    100

    Hi Tom,

    Thanks for your detailed report and you are right the value wasn't assigned. I made the wrong assumption about tags I guess. I made a hotfix for this issue which is available at http://hotfix.soetemansoftware.nl/CMSImport/ This fix will be included in the 2.3.2 release.

    Thanks for reporting this.

    Thanks,

    Richard

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Feb 04, 2013 @ 19:11
    Tom Fulton
    0

    Awesome, thanks Richard!

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 04, 2013 @ 20:53
    Richard Soeteman
    0

    Glad it worked for you Tom!

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Feb 06, 2013 @ 18:23
    Tom Fulton
    0

    Just confirming, used the hotfix yesterday and all worked well!

    One other thing you might want to add to the Tags FieldAdapter is to trim leading/trailing spaces.  In my case I had a CSV like "tag1, tag2, tag3" and it looks like some tags got imported as " tag2" etc.  I was able to fix it in my datasource, but just thought I'd let you know as it seems like a quick fix :)

    -Tom

Please Sign in or register to post replies

Write your reply to:

Draft